Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 6009 continuously sampling loop lag

I have a NI USB 6009 DAQ device and am trying to sample continuously at 2000 Hz, taking 200 samples at a time. I am using LabVIEW 2012 and the code I am using is very similar to the code generated by the DAQ assistant for continuous sampling. Most of the time the program runs perfectly. However, random times running the code it will still gather all the data points, but will update the charts slowly. In these instances it seems to get stuck in the DAQ function from a couple seconds, filling up the buffer, and then the next number of times it runs through the DAQ function it runs through it almost instantly, just pulling the data points from the buffer. Any ideas at to what might be causing this?

 

DAQ assistant.png

Inside of the modified DAQ assistant (very similar to continuously sampling DAQ assistant)

 

DAQ test.png

DAQ Test program that runs that continuously sampling DAQ assistant

 

DAQ test FP working.png

Front Panel of DAQ test when working correctly - Time to run DAQ task is always around 100 ms

 

DAQ test FP when not working.png

Front Panel of DAQ test when not working properly - time to run DAQ is over 2 sec for one iteration and is close to 0 for iterations between

0 Kudos
Message 1 of 5
(4,397 Views)

Hello littleowl960,

 

 

Thank you very much for posting your question on our forums. I would like to show you an article that might help us fix this behavior. You can find the article by following the link below:

  • Why Do My Waveform Charts Update Slowly?

http://digital.ni.com/public.nsf/allkb/72D9CA2075A3FBB28625752F00686D4E?OpenDocument

 

Please let me know if this information was useful.

 

 

Regards,

 

Luis

0 Kudos
Message 2 of 5
(4,372 Views)

I don't think it has to do with the chart history length. It's an intermitant problem that will occur about half the time you start the program, but for the entire duration that the program runs. You can tell that it is lagging instantly when you start the program.

0 Kudos
Message 3 of 5
(4,360 Views)

Hello littleowl960,

 

 

Great, thanks for the info. Since this behavior is intermittent and appears at the time the program is started, we should try to isolate the root cause of the issue. So I would like to know if you have tried  monitoring the CPU usage and memory when the chart is behaving as mentioned? Also, did you tried disabling the Synchronous Display to test if this might improve the update speed of the chart?

 

I see that two indicators on the front panel is slightly overlapped, so have you tried separating them? I do not think that this is the main cause of the behavior, but as I mentioned I rather try everything possible in order to isolate the issue, because this might come from different situations.

 

 

Regards,

 

Luis       

0 Kudos
Message 4 of 5
(4,338 Views)

I think I figured out the problem. I was sampling at 2000 samples per second on 4 different channels and my DAQ device only supports 4.8 kS/s. Thank you for your help!

0 Kudos
Message 5 of 5
(4,318 Views)