LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ with NI 9205 - Some basic/timing questions

Hello Fellow Developers:

I am using the convenient 9205 module on cDAQ chassis to acquire voltage differential signals, ultimately I’d like the following:

To get samples from 2 channels at 500Hz(min)/1kHz (preferred) with relative time stamp for every reading.

I was originally planning to get a time stamp before acquiring, acquire signal the samples, and queue the time stamp/2D voltage readings array to another loop for time stamp processing/data save. I was able to do a mock-up with DAQ mx, so far so good.

  1. Question: can I assume that the 1000 Samples that I get are approx. equidistant from one another? Meaning if I acquire at 1KHz, 1000 samples, the samples that I get are 1 ms apart?
  2. There seems to be a “lag” of approx. 95ms per loop, meaning instead of 1000ms loops, I am getting 1095ms. I know it is probably the overhead to process the data, but this also means that I am not getting data for that extra lag. Is there a way to get around this? I have tried continous and N-sampling, both are giving me approx the same lag.

Santiago

 

0 Kudos
Message 1 of 4
(2,755 Views)

To some extent it doesn't matter how much lag there is because your acquisition clocking is being done in HW on your DAQ board - not in LV. So yes the samples will be spaced exactly as they should (plus or minus the timing accuracy of the board, which is typically in the nanosecond range). Moreover, if you specify continuous sampling you can append the samples from one iteration directly to the end of the samples from the previous iteration because there was in actuality no gap between them.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 4
(2,749 Views)

Thanks Mike for your prompt response. I will use continous then.

Since the HW is queueing 1000 samples every 1000ms, whereas I am pulling 1000 roughly every 1100ms, won't I eventually get data overflow? if so can you suggest a way to mitigate this?

0 Kudos
Message 3 of 4
(2,740 Views)
Yes, that's why I said "to some extent". You can make your data buffer larger, read more at one time, or go to a producer-consumer structure that moves your processing out of the acquisition loop. The last is probably the best solution.

You also might save a little time by changing from a waveform datatype to a 1D array of doubles.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(2,728 Views)