Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Timing

Hello, I have a DAQ Assistant , 4 signal collectors and one Write to Meas File placed in a while loop. The DAQ Assistant is set to aquire 1 sample(on demand) and i need to have 2 samples per second. So when i have a timer to wait 500 ms i get one sample every 2 seconds instead  of 2 samples per second. Why is that and how i can get perfect match between time column and no of samples in the file i obtain?

 

Thanks in advance!

0 Kudos
Message 1 of 4
(3,672 Views)
With on demand timing, you are using software timed operations and with the Write to Measurement File, you are using a slow method. Set the DAQmx timing for your rate and use N samples in continuous mode. You should use a producer/consumer architecture if you stick with Write to Measurement File. Or, use the lower level DAQmx functions and tdms streaming.
0 Kudos
Message 2 of 4
(3,661 Views)
Should i let' s say set to 4 samples to read with 8Hz in order to get 2 samples Per second?
0 Kudos
Message 3 of 4
(3,657 Views)
A sample rate of 8Hz means 8 samples per second. If you specify 4 samples, it will acquire those in half a second. This is basic arithmetic.
0 Kudos
Message 4 of 4
(3,650 Views)