© National Instruments
|
4-5
Figure 4-6.
Start Trigger Initiates Waveform Generation
To use a start trigger, call the DAQmx Start Trigger (Digital Edge) VI or function. Inputs to this
VI or function include:
•
Source—Specifies which terminal to use as the Start Trigger signal.
•
Edge—Specifies a rising or falling edge.
The following DAQmx Trigger properties configure the Start Trigger:
•
Start.Delay, Start.DelayUnits—Specifies the delay from when the trigger occurs to when
the NI 6614 begins generating pulses.
Note
Even if the Start.Delay is set to 0, the NI 6614 inserts a minimum delay equal
to two ticks of the counter timebase.
•
Start.DigEdge.DigFltr.Enable, Start.DigEdge.DigFltr.MinPulseWidth—Enables and
configures a digital filter on the start trigger input. This filter eliminates noise on the start
trigger signal. Refer to Chapter 6,
, for more information.
Generating a Waveform with Variable Frequency and
Duty Cycle
Figure 4-7 shows an example of a waveform with variable frequency and duty cycle.
Figure 4-7.
Waveform with Variable Frequency and Duty Cycle
The counter begins by generating a waveform with an initial frequency and duty cycle. On the
first active edge of sample clock, the NI 6614 reads the first sample out of the buffer. The first
sample consists of two values: frequency1 and duty_cycle1. The counter begins generating a
waveform with frequency1 and duty_cycle1.
On the second active edge of the sample clock, the NI 6614 changes the waveform to have
frequency2 and duty_cycle2. On the third edge of the sample clock, the NI 6614 changes the
waveform to have frequency3 and duty_cycle3. And so on.
When the NI 6614 detects an active edge of the sample clock, it finishes generating the current
pulse (idle and active level) before beginning the new waveform frequency/duty cycle.
S
t
a
rt Trigger
O
u
tp
u
t
O
u
tp
u
t
Sa
mple Clock
Initi
a
l Fre
qu
ency,
D
u
ty Cycle
Sa
mple 1
(Fre
qu
ency 1,
D
u
ty Cycle 1)
Sa
mple 2
(Fre
qu
ency 2,
D
u
ty Cycle 2)