Programming instructions

Chapter 24 Generating a Square Pulse or Pulse Trains
©
National Instruments Corporation 24-11 LabVIEW Data Acquisition Basics Manual
examples\daq\counter\DAQ-STC.llb
. You could also use the
example Cont Pulse Train-Int (9513) VI located in
labview\examples\
daq\counter\Am9513.llb
. These examples show how to generate a
simple pulse train using Intermediate VIs.
Figure 24-14.
Diagram of Cont Pulse Train-Int (DAQ-STC) VI
With this VI you can specify the frequency, duty cycle, and pulse polarity
of your pulse train. If the duty cycle is set to 0.0 or 1.0, the closest
achievable duty cycle is used to generate a train of positive or negative
pulses. The Continuous Pulse Generator Config VI configures the counter
for the operation and the Counter Start VI controls the initiation of the pulse
train. For example, you may want to generate a continuous pulse train as
the result of meeting certain conditions. If you use the Easy VI, the pulse
train starts immediately. With the Intermediate VIs you can configure the
counter at the beginning of your application, then wait to call Counter Start
after the conditions are met. This approach will improve performance.
When the
STOP
button is pressed, the while loop stops and Counter Stop
is called to stop the pulse train.
You must stop the counter if you want to use it for other purposes. For
more information on stopping counters, refer to the
Stopping Counter
Generations
section at the end of this chapter.