07-08-2019 08:31 AM
Hi.
I have a problem with the sampling speed of the NI 9234 board whenever it is used with the Sound Pressure option.
In one of my experiments, I was sampling a 100 Hz signal at Fs = 50 kHz, and when I traced the FFT of that signal, I realized that the peaks were slightly swiped to the left in comparison to the signals acquired with other systems. After some tinkering, I concluded that the signal would be perfect if the sampling speed was 51160 Hz.
To confirm my suspicions, I acquired the signal of a 1 kHz calibrator at 94 dB and the conclusions were the same: there was a difference between the programmed sampling speed and the real sampling speed, with the only silver lining being a proper performance of the DAQ when the sampling speed was set to 51160 Hz.
Does anyone have any clue of why this is happening?
Thanks in advance.
Solved! Go to Solution.
07-08-2019 09:54 AM
The NI 9234 supports a fairly limited number of sampling frequencies. The spec says that the avaliable frequencies are given by
f_s = (f_m / 256) / N
where f_m is the frequency of the internal master timebase (13.1072 MHz) and N is an integer from 1 to 31. I believe it's also possible to use an external timebase.
If you are requesting 50 kHz, I think it will give you the next highest available frequency, which is 51.2 kHz (N = 1), i.e. nearly 2.5 % out. When you change your request to 51160 Hz, you still get 51.2 kHz but this is now less than 0.1 % out.
You can use the DAQmx Timing property node to read the actual Sample Clock Rate acheived after you have set it.
Andy
07-09-2019 01:02 AM
That makes a lot of sense! Thank you for the quick and accurate answer!
Andrew