Quantcast
Channel: LabVIEW topics
Viewing all 66753 articles
Browse latest View live

DAQmx Read All Available Samples (NChan, NSamp)

$
0
0

I want to setup a DAQmx voltage task, sampling continuously with multiple channels.  I would like to setup the read loop DAQmx read function to read all available samples.  I will setup the read function for NChan, NSamp.  My question:  Will the function return waveforms with data up to the last complete channel scan?  Or will it return absolutely whatever is there, even if the channel list was partially sampled?  If it is the latter, I expect my waveforms to be different lengths (by one sample).  I would prefer the former - that it gives me data up to the last complete channel scan.  Then the remaining data would be available for the first complete channel scan in the next data set I read.  I couldn't glean this info from the documentation I found on the read all available samples property.

 

FYI, The DAQmx task will be on a PXI-1050 combo chassis, with a 6251 card controlling the SCXI multiplexed sampling of an SCXI-1102B.

 

Thanks!


USB-6009 with nidaqmx & PyDAQmx Analog output error code -200077

$
0
0

Hello everyone

 

I want to use pydaqmx or nidaqmx to control USB-6009 DAQ to output some square wave. I follow the installation instructions(nidaqmx in anaconda 3 and PyDAQmx in pycharm), and python version 2.7.12 and 3.5 are used. 

 

If I try nidaqmx input examples, no error happens. But if I try nidaqmx output example, error happens.\ The same problem happens on PyDAQmx&pycharm environment. I believe it's not the problem about nidaqmx or PyDAQmx. And USB-6009 can output voltage between from 0 to 5 volts from test panel in NI MAX. I change the input value in the program from integral to float between 0 to 5 volts. But the error always display that my requested value is 10.0 V. How to solve the problem? 

DAQError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AO_Max
Requested Value:  10.0
Maximum Value:  5.0
Minimum Value:  0.0
Channel Name: Dev1/ao0

Task Name: _unnamedTask<1>

Status Code: -200077
 in function DAQmxStartTask

 

Thanks,

Fanglin

NIMC blend Not Complete Error

$
0
0

what is this error? i mean how can i possibly fix this error. somebody please help!!! thank you in advance...

 

error #70087

Guardar valores de vibracion (rms, peak, etc) y leer en chart o XY graph

$
0
0

Llevo una semana de cabeza tratando de hacer lo siguiente:

 

Con una daq 9234 capto valores globales de vibración y necesito guardarlos para poder visualizarlos mas adelante (vigilar la tendencia de la vibración en equipos rotatorios) . Hice un vi que guarda un valor cada 5 minutos. He guardado los datos en un .tdms y en un archivo de texto sin problemas.

 

El problema es que necesito guardar meses o años de mediciones  y si tomo un valor cada 5 minutos, en un año tendré 105.120 datos y no creo que un chart o xy graph aguante tanto (excesivo uso de memoria).

Al leer el tdms, puedo graficar sin problemas el eje Y (amplitud), pero el eje X lo toma desde tiempo 0 (primera medición) y va sumando el wf_increment y no toma en cuenta el timestamp que también se guarda en una de las columnas del .tdms. La ventaja de usar el tdms es que puedo crear un vi que lea los datos por tramos y los muestre según mueva un  scrollbar. Asi puedo con el count decidir cuantos datos muestro en el gráfico. Pero la fecha que muestra el eje x no es la real (ver imagen 1).

 

Luego intente guardar en un texto una columna con el timestamp y otra con su amplitud respectiva. Todo bien pero no logro crear algo similar a lo que hice con el tdms, de poder seleccionar un tramo de las mediciones y no todas.

Favor su ayuda

 

Pd: los errores no los tengo cableados, si se que no esta bien pero los coloco cuando ya tengo armado y funcionando el vi Smiley Happy

 

 

Using PID Auto-Tuning Offline

$
0
0

Hello to NI Community, 

I'm new to this Labview software and I just want to ask to people that knows about it regarding on the control system using Labview. Been attached is the sample of my block diagram that involves PID auto-tuning like the example in Labview. When I run the block diagram, it shows the error 'Error -200103 occurred at PID output.vi:Instance:2:500001 Number of samples to write must be the same for every channel.' I tried to make sure all the samples to be the same for every channel but it didn't work out. Basically what I want to do is that I want to put analog input/existing data signal together with the PID auto-tuning and produce new output that will be reproduce using the analog output like in the block diagram i had attached. So, what is the problem with my block diagram? How I can run it without any problem/error? I'm very sorry to ask this kind of question as I'm very new to this software. Please help me. Thank You. 

synchronizin timed loop

$
0
0

Hello all,

I have few simple questions. I am using Crio-9076 with input card NI9234 and output card NI9263.

You can see my program below.

I have three timed loop. In first loop I am trying to generate chirp signal and send it to analogy output. In second loop I read data from acc. Third loop is UI.

  1. Any idea how I can synchronize 1. and 2. loops so they sample at same time.
  2. Any idea how to get the time (in second) for chirp signals without using elapsed time function.
  3. Is it possible to take timed loop’s time and when it reach some time in second stop the loop ( I am trying to avoid elapse time function)
  4. Any idea to improve my program

I am very thankful in advanced for your helping (example would be very helpful)

Mikko

 

 

USB-6009 with nidaqmx & PyDAQmx Analog output error code -200077

$
0
0
Moved to another board since this has nothing to do with LabVIEW

problem with Graph multi-scale.

$
0
0

Hi,

I how can solve this problem automatically, When the Y axis shifts,Knowing that I also use a method to plot a multi-scale Y graph.
My multi scale in graph works at first time but after some test He does that to me.

ss.png
Sans titre.png

the solution is to ceat a new graph.
Here is my code:
extrai.png

Thank you .


VISA resource name not found in LabVIEW

$
0
0

Dear all,

 

I am trying to control an instrument using USB connection and VISA. I used the VISA Driver Wizard to create the driver and the instrument is correctly recognized by NI MAX. I can also send and receive bytes. The instrument does not have any software / driver provided by the vendor so I think the only choice I have is going with the VISA wizard. The developer can send me USB low level details (command number XX, number of bytes to read, etc). 

 

Even if the instrument is correctly read by max and Vendor ID and model ID is correct, when I try to have access in labVIEW , I use the VISA open and the VISA resource name is not found....

 

Can you help please?

 

Thanks.

USB-6211 Generate,Acquire signal issue

$
0
0

Hi,

I have attached the vi file of the GenerateAcquire signals using USB-6211.

 

I have generated a 1Khz signal of square wave with ampliture 2.5 and offset 2.5

 

The analog OUT and IN DAQ assistant is created and I have used a wire on the USB6211 terminal to loop back from AO0 to AI1.

 

I have attached the image and vi where the generated signal shows 1Khz but acquired signal only shows 30Hz approx. 

 

Can I please know why I am not getting 1KHz. Where I have done the mistake.

 

Regards,

Vikash

 

 

Extract inner XY coordinates

$
0
0

Hi,

I need to calculate the area "inside" the collection of given XY coordinates, basically the inner part of the XY graph.

In know how to calculate area for XY coordinates but I can't figure out how to extract the "inner" ones from this collection.

I hope I was clear... ...

All inputs are welcome!

Regards

Alain

Using LabVIEW with MCC daq

$
0
0

Hello:

 

I am trying to connect my DAQ to LabVIEW. I am using the guide that you can find attached, and a tutorial on youtube (https://www.youtube.com/watch?v=GqyooarvbuM). However, I am not able to do it properly. Since I have a the following error: SubVI 'ULx Create Virtual Channel.vi': required input 'physical channels' is not wired. Moreover, when I select the function "create Channel" I got 30 warnings, I think because the name of the folder is different from what expected (LabView 2013 instead of LabView 8.5). 

 

Can someone help me?

 

Thanks,

Gianmario

NIPMCommError NI Package Manager

$
0
0

Hello,

 

I get the following Error when I start the NI Package Manager.

 

The Info at ni.com/info doesn't help.

 

When I try the URL http://download-preview.ni.com it seems the Server doesn't exist.

 

Are the URLs correct?

If not how can I fix them?

 

Thank you

 

1386 error with Dotnet 2.0 DLL config file doesn't work

$
0
0

I'm calling a 3rd party DotNET 2.0 DLL in Labview 2014.

The DLL is TopCONAPI.DLL here

www.regatron.com/en/products-topcon/software-products/programming-overview/topcon-api

I have confirmed it's coded in .NET 2.0 using ILSPY

The PC has .NET 4.6.1 & 3.5.1 installed, I don't think it will let me install the old 2.0 as well.

 

It works fine in edit mode with a labview.exe.config file with the contents:

<?xml version ="1.0" encoding="utf-8" ?>
<configuration>
   <startup useLegacyV2RuntimeActivationPolicy="true">
      <supportedRuntime version="v4.0.30319"/>
      <requiredRuntime version="v2.0"/>
      </startup>
</configuration>

 

based on advice elsewhere, incl

http://digital.ni.com/public.nsf/allkb/567F6EFFC5669C348625739B003739CD

 

I've built the project as an .exe file but when it gets to the .NET constructor it throws the error '1386, Main.exe, specified dot net class is not available in Labview'.

 

Any suggestions how to get round this? I smy .config syntax missing something ?

Many thanks for any tips, Brian

 

 

Red Lion CUB5 used as Counter

$
0
0

Red Lion CUB5 with CUB5COM serial communications plug-in option card used as a counter.

 

Data Bit:  8-bit

Abbreviated Printing: yes

Print Options: yes

Count A: yes

Everything else: no

 

Short VI to read total count every 1 second.

 Red Lion CUB5.jpg


Guardar valores de vibracion (rms, peak, etc) y leer en chart o XY graph

Random number array and output to string

$
0
0

I'm trying to generate random numbers, convert them to strings, and then print them to a string with commas separating them. I can build this manually (work in progress), but I'm trying to be more efficient and use a loop/array arrangement. Any advice?

 

Capture.JPG

Using counter inputer as the stop condition for a loop issues.

$
0
0

I am wanting to measure the data from one revolution from the sensor connected to my daq. I know that for each revolution there are 24 pulses. What I tried doing was using a counter input that is taken from the input, and set a stop condition for when the counter is equal to or higher than 24. The issue I'm having is that when I increase the number of samples taken the counter goes well beyond 24. I am using a sampling rate of 35,000. If I have the number of samples set to 100 it will stop when then counter is at 26. When the number of samples is at 1000 the count goes up to 55. At 10,000 it goes up to 370. I'm confused as to why it is increasing. By taking more samples it should increase the accuracy of the acquisition shouldn't it? I'd like to have the stop condition be controlled by the counter as the input frequency is not constant.

Data Analysis: Plot Zoom In

$
0
0

Hello everyone, 

Please check the screen shot below. I trying to do the same in my VI that I attached. There are three cursors in the original XY graph and the three other small XY graph are connected to it. If you move the cursors in the original plot, then the Zoomed-in version of the graph shows up in the small plots. Can anyone check my vi block diagram and tell me how I can implement that In my graph? Thank you. Screen Shot 2017-08-16 at 9.30.09 AM.png

Implications of renaming VIs in instrument driver

$
0
0

I am in the middle of refactoring and updating an instrument driver (non-SCPI), making it more similar to the standard templates.

In the interest of making it more standardised, I intend to rename various functions.

Given that I have :

1) Moved from an LLB to LVLIB, so namespace changed,

2) Standardised a lot of connector panes to 4224, so relinking is required,

3) Written new functions to replace old ones, and rewritten some old ones

4) Changed everything to use VISA instead of using cases for TCP/Serial

is there much of a penalty in renaming some of them to be more descriptive?

 

I think at this point any developer who wants to use the newer version is going to do quite a bit of replacing in their code. I would include revision notes to identify what names have changed. Note that the customer developer base is in the order of 10s, plus a few "internal".

Viewing all 66753 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>