09-28-2015 06:45 AM
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
09-28-2015 07:21 AM - edited 09-28-2015 07:21 AM
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:
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...)
09-28-2015 07:39 AM
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.
09-28-2015 07:40 AM
Could you downconvert the VI to LabVIEW version 2014? I do not have LV2015...
09-28-2015 07:54 AM
Attached is the Vi converted to lv 2014.
Thanks
09-28-2015 08:42 AM
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...
09-28-2015 09:20 AM
Thanks for your reply! We will look into it tomorrow and keep you updated 🙂
Kind regards