Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform buffer generation Desired Sample Clock Rate and Resulting Sample Clock Rate

Solved!
Go to solution

Hello, I am trying to generate an square waveform continuosly for NI6221 DAQ at 2kHz. I am using the Cont Gen Voltage Wfm-Int Clk.vi example, which works fine for my purposes. However, the timing parameter Desired Frequency is sometimes different from the Resulting Frequency, according to the choice of the Samples and Cycles per Buffer. By tracking dozn the origin of these variables, all come from the Property nodes of the DAQmx-Timing in the Waveform Buffere Generation (multi).vi, where the input and the output frequencies are not the same. Now, why is it so? What is the way the frequency is calculated? I guess it is related to an internal approximation of the board clock divided by the sample scan rate, but how exactly? 

I found some notes in the help (see attached figure), with some schematics of the oscillators according to the DAQ board (type M) but there I got lost.

thank you very much

Virgilio

Download All
Message 1 of 2
(3,767 Views)
Solution
Accepted by topic author antony_sc

The AO sample clock is generated by dividing-down the timebase.  If you select a sample clock frequency that can not be reached by dividing the timebase by an integer, the sample clock frequency will be rounded to the nearest available sample rate (it might be worth noting that AI tasks always round the frequency up rather than rounding to the nearest available).

 

For example, the maximum internal timebase available for AO is 20 MHz.  If you select a 300 kHz sample rate, this would not be achievable (20 MHz / 66.66666...).  Instead, ~298.5 kHz will be used (20 MHz / 67).

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 2
(3,758 Views)