From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High Speed Data Acquisition

Hello all,

 

We are trying to make a LabVIEW VI that is capable of detecting pulses with a frequency of 18 microseconds per pulse. This pulse is generated a thousand times per second, so we need a very high sampling rate in order to detect it. We are currently using a NI USB-6211 with a sampling rate of 250 kS/s according to the specifications. However, when we try to run the VI using virtual channels it only goes to roughly 270 loops per second even though we do not have a delay in the while loop. Whenever we try running the VI at a sampling rate of 150 - 250 kS/s the signal in the waveform chart stops moving and gives error message 200019 (ADC conversion attempted before the prior conversion was complete) or error code 200279 (the application is not able to keep up with the hardware acquisition). What should we do? Your time and help would be greatly appreciated by us.

 

Thanks in advance Robot Happy

 

0 Kudos
Message 1 of 7
(4,546 Views)

In order to help, we need to see your VI(s). If you attach them, we can look into what can be the problem.

Questions:

  1. Do you use proper low level DAQmx VIs in your application (Express VIs are "no go")?
  2. How did you set up your DAQ loop? Even if there is no delay in your while loop, there can be other elements which slow it down (file operations, Chart, etc...). Solution: use a proper design pattern, like Producer/Consumer.

Here as I see you actually want to detect pulses. Did you search for some examples using the built-in "NI Example Finder", under the section DAQmx? There are some useful VIs you can examine... (Impulse detection, etc...)

 

0 Kudos
Message 2 of 7
(4,526 Views)

Hello Blokk,

 

I've attached our VI, we would appreciate it if you could look into it. We only want to detect how many peaks there are per second so we can say if our sensor is faulty or not. We have already searched for a few example VI's but none were found to be to our liking. 

 

Thanks in advance. Cat Happy

0 Kudos
Message 3 of 7
(4,508 Views)

Could you downconvert the VI to LabVIEW version 2014? I do not have LV2015...

0 Kudos
Message 4 of 7
(4,505 Views)

Attached is the Vi converted to lv 2014.

 

Thanks

0 Kudos
Message 5 of 7
(4,491 Views)

I see multiple problems in this VI. Overusing (abusing) local variables, and you put everything in one while loop.

There are some unnecessery logical operations too (Rube Goldberg) at different places. You should separate your DAQmx tasks in separate independent while loops. So you want to count the valleys in your Waveform signal as I see. You use two AI channels at 10 kHz sampling rate. This gives you 100 microsec resolution, which is not enough to detect your pulses as I see.

 

First of all, you should check some examples how to set up proper DAQ tasks (independent while loops running at different rate), and very important to use a kind of Producer/Consumer pattern! In this way you do not slow down your acquisition with additional tasks...

0 Kudos
Message 6 of 7
(4,467 Views)

Thanks for your reply! We will look into it tomorrow and keep you updated 🙂

 

Kind regards

0 Kudos
Message 7 of 7
(4,449 Views)