10-22-2012 10:03 PM
I am using an M-series device (NI-6259) for simultaneous analog input and output and DIO. I have to set my sampling clock rate to f_clk = 100 kHz (10 us time intervals between clock pulses); using the 20 MHz timebase is not an option, unfortunately, due to the way I must sync external electronics.
My question is what happens when I request my sampling frequency (programmed in LabView) to be fs = 15 kHz. In this case, I am essentially requesting samples at time intervals of Ts = 1/15 kHz = 66.67 usec. This is not an integer multiple number of clock pulses. So, what sampling rate will I actually achieve? Can data be acquired exactly at integer number of clock pulses---in which case I might get fs = 1/60 usec or fs = 1/70 usec? Or is there something else that happens 'under the hood' that will maintain my data acquisition at exactly 15 kHz?
Thanks in advance for any help/insight you can provide.
10-23-2012 08:00 AM
Your actual sample clock freq will definitely be an integer divisor of the timebase. After calling DAQmx Timing to "request" a sample rate, you can query a DAQmx Timing property node to read the actual rate that will be used. If your requested rate results in a fractional divisor, the actual rate will correspond to one of the neighboring integer divisors.
-Kevin P