LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition frequency is off...

I'm trying to track down a discrepancy.
(Using a NI-4451 card)

Calling DAQ_Set_Clock with 20 000Hz and getting 20 000Hz in return.

Doing acquisition on 100 000 samples with SCAN_Start (single shot, single buffer, single channel).
The acquisition is expected to last 5s but in reality lasts for about 5.093s

A 1kHz reference signal input into the card shows up as 933Hz based on this 20kHz sampling.

Where should I look for an error ? I can reliably reproduce this at various sampling frequencies.
--
Guillaume Dargaud
http://www.gdargaud.net/
"Don't bother me, I'm busy conserving energy, momentum, and angular momentum."
0 Kudos
Message 1 of 2
(2,456 Views)
Guillaume -

I've attached some code that I wrote specifically for a 4472, but you can easily modify it work with a 4451. Just add the device number as a constant and don't use excitation.

Do you see the same thing with this project?

Also, I'm assuming that you're doing an FFT to calculate the frequency of the signal. What's the frequency resolution of your FFT?

Jack
0 Kudos
Message 2 of 2
(2,456 Views)