02-23-2016 12:29 PM
03-04-2016 11:58 AM
1. For the record, it won't be truly "random" whether the delta time shows as 0.000488 or 0.000489. There will be a regular and repeatable pattern based on the specifics of the quantization error inherent in the sample clock rate *and* the precision and rounding involved in the "write to measurement file".
2. Your device is constrained to have very discrete available *actual* sample rates, regardless of what you request. When you request something that doesn't match exactly to an available rate, DAQmx will use the adjacent available rate without returning an error. I expect it will generally go to the next higher available frequency because that's usually a safer choice than going to a lower rate.
Page 6 of your device's spec sheet shows that you will only be able to get integer divisors of 51.2 kHz. And, oh hey! Looks like 2048 Hz is in fact an integer divisor, so you're already on the right track there after all.
So I would say that yes, your device is sampling at the 2048 Hz you requested and that the actual time between samples is in fact 0.00048828125 sec (give or take the accuracy of the oscillator). So it's probably just the "write to measurement file" function that's rounding a cumulative time total. I've never used that function, but I suspect there's a way to specify your need for greater precision in the stored data.
-Kevin P