Chapter 4
General-Purpose Counter/Timer
©
National Instruments Corporation
4-13
DAQ-STC Technical Reference Manual
Figure 4-16.
Continuous Pulse-Train Generation
4.4.4.2 Buffered Static Pulse-Train Generation
This function is similar to continuous pulse-train generation except that the software
maintains a software count of the number of pulses that have been generated and stops the
pulse generation after a predetermined number of pulses. The G_GATE active edge causes
the counter to generate a sequence of pulses with programmable delay from trigger, pulse
interval, and pulsewidth. The counter uses G_SOURCE as a timebase to generate the pulses,
so you specify the programmable parameters in terms of periods of the G_SOURCE input.
After each pulse, an interrupt notifies the CPU so that the interrupt software can increment
the software pulse counter. After the desired number of pulses have been output, the software
terminates the pulse generation. Figure 4-17 shows the generation of three pulses with a delay
from trigger of three, a pulse interval of four and a pulsewidth of three.
Figure 4-17.
Buffered Static Pulse-Train Generation
G_SOURCE
G_GATE
G_OUT
Counter Value
Counter TC
2 1
0
1
2
2
2
2
1
0
3
2
1
0
2
1
2
0
0
3
1
G_SOURCE
G_GATE
G_OUT
Counter Value
Software Counter
Counter TC
2 1
0
1
1
2
3
2
2
2
2
1
0
3
2
1
0
2
1
2
0
0
3
1