10-07-2014 01:47 PM
Hi, Im trying to get data using Signal Express + NI USB-6211, I set the sample rate to 44100Hz. and everything seems to be ok but when I checked data I realized that time column is not increasing in a constant of period time(ie. sample freq. not fixed).
For example:
1/(time(1)-time(2))=43478.26 Hz.
1/(time(2)-time(3))=45454.54 Hz.
and it alternates continuously between both frequencies. I have to perform a FFT and Im not sure what is the actual frequency and whats going on.
I appreciate any help on this issue.
Regards.
Solved! Go to Solution.
10-07-2014 05:15 PM
This seems like a bug that NI should be made aware of if they are not already.
If you set the sample rate to 44100, The actual sample rate will be (20 MHz / 453) or ~44.150 kHz. The USB-6211 has a 20 MHz AI timebase (±50 ppm) and it divides this clock by an integer to derive the sample clock. The sample rate will always be coerced up if a rate is chosen that cannot be achieved with an integer divisor. Regardless of what the file shows, the DAQ card itself samples at a consistent rate (unless you are using an external clock or something like that...).
As for the behavior in the time column... I'm not exactly sure how you're looking at it but I get the same behavior if writing my data using "absolute time" for the time column of an ASCII file (or using an LVM file, which always uses absolute time). Using "relative time" however gives me the correct result. I can only speculate as to the cause... it seems likely to me that there is a floating point rounding error (absolute time is in terms of seconds since 1904, so the software is working with large numbers that simultaneously require high precision).
Best Regards,
10-09-2014 08:40 AM
John, I tried "relative" and "absolute" modes, but both shows me the same result, I export data to a text file.(Labview SignalExpress 2012 Version 6.0.0)
Anyway, I wil take your advice and process data using 44.150khz.
Thanks for your useful reply.
Regards,
Alan
10-10-2014 09:05 AM
Hi alanesco
What John_P1 mentions about the way the DAQ Board calculates its sample rate is correct If you want to have a more accurate Sample Rate you would need an external clock that can exactly give you the desired Frequency.
About the way the time is being logged to your file it would be very helpful if you could send us your program. This way we can review how you are logging the file and what is causing the time differences.
Have a great day!!!!