4-4
|
ni.com
Chapter 4
Counter Output
Generating a Waveform with Constant Frequency and
Duty Cycle
The NI 6614 can generate a continuous waveform of constant frequency and duty cycle.
Figure 4-5.
Waveform with Constant Frequency and Duty Cycle
Create Channel
You specify the characteristics of the waveform when you create the channel. You can specify
in terms of frequency and duty cycle, time, or ticks.
Frequency and Duty Cycle
To specify the waveform in terms of frequency and duty cycle, use the DAQmx Create Channel
(CO Pulse-Generation Frequency) VI or function.
Time
To specify the waveform in terms of time, use the DAQmx Create Channel
(CO Pulse-Generation Time) VI or function. Set the HighTime and LowTime inputs to indicate
the duration of each cycle of the waveform.
Ticks
A tick is one period of the Counter Timebase. By default, the timebase is 100 MHz, so
a tick is 10 ns. To specify the waveform in terms of ticks, use the DAQmx Create Channel
(CO Pulse-Generation Ticks) VI or function. Set HighTicks and LowTicks to indicate the
duration of each cycle of the waveform.
Channel Settings
By default, the counter outputs the pulses on a default PFI terminal. Refer to Chapter 5,
, for more information
You can change the output terminal by using the CO.Pulse.Term DAQmx Channel property.
Timing Settings
For a continuous waveform, use the DAQmx Timing (Implicit) VI or function. Set the Sample
Mode input to Continuous Samples.
Triggering Setting
By default, the NI 6614 begins generating the waveform when the DAQmx Start Task VI or
function is called. The NI 6614 can also begin generating pulses in response to a digital trigger.
Figure 4-6 shows an example where pulses are generated in response to a digital trigger.
O
u
tp
u
t