12-06-2013 12:37 PM
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
Solved! Go to Solution.
12-06-2013 01:32 PM
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,