3-38
|
ni.com
Chapter 3
Counters
Frequency Generator
To generate a square wave of a fixed frequency you can use a counter to create a continuous
pulse train. Refer to the
Generating a Waveform with Constant Frequency and Duty Cycle
section for more information.
In addition to the eight counters, the NI 6612 has a dedicated Frequency Generator circuit. The
Frequency Generator circuit is more limited than one of the eight counters. However, it may be
useful if all of the counters are dedicated to other tasks.
Figure 3-42 shows the Frequency Generator circuit.
Figure 3-42.
Frequency Generator Circuitry
The Frequency Generator can use one of three timebases: 20 MHz, 10 MHz or 100 kHz. The
timebase can be divided by any integer from 1 to 16 to create the FREQ OUT signal.
Create a virtual channel using the DAQmx Create Channel (CO-Pulse Generation-Frequency)
VI or function. Choose <device name>/freqout for the counter input to this VI or function. Set
the frequency input to the desired value. NI-DAQmx will choose the timebase and divisor that
best matches the desired frequency.
The device routes the frequency output signal to an output pin or terminal. Select the output
terminal by using the CO.Pulse.Term DAQmx Channel property.
100 kHz Time
bas
e
20 MHz Time
bas
e
Fre
qu
ency
O
u
tp
u
t
Time
bas
e
FREQ OUT
Divi
s
or
(1–16)
Fre
qu
ency Gener
a
tor
÷
2