Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter square wave generation frequency not accurate

Solved!
Go to solution
Highlighted

Hi NI community,

  I'm using a usb-6351 daq card generate tunable frequency square wave. I wanted to generate square waves in the range of 10-1000Hz. I'm using the 100kHz time base and toggle mode of the counter to generate the square wave. It seems that it will work fine 1kHz and above, but at lower frequency, it is much less accurate. Is it reasonable?

Best,

Danqing

0 Kudos
Message 1 of 3
(422 Views)
Highlighted
Solution
Accepted by Wangdq941223

Nope.

 

You should see more "quantization error" as your pulse train *increases* rather than as it *decreases*.

 

Why are you using the 100 kHz timebase?   That seems like an artificial constraint.  The default behavior for the device will be to use the fastest timebase capable of producing your output frequency, leading to smaller potential for quantization error in your desired output frequency.

 

All devices I'm aware of can produce 10 Hz pulse trains with the fastest onboard timebase which will probably be 100 MHz, 80 MHz, or 20 MHz (for *very* old devices).

 

 

-Kevin P

Message 2 of 3
(385 Views)
Highlighted

Got it. Thank you Kevin! 

0 Kudos
Message 3 of 3
(284 Views)