Programming instructions

Chapter 25 Measuring Pulse Width
LabVIEW Data Acquisition Basics Manual 25-4
©
National Instruments Corporation
Am9513
Figure 25-5 shows the diagram of the Measure Pulse-Easy (9513) VI
located in
labview\examples\daq\counter\Am9513.llb
, which
uses the Easy VI, Measure Pulse Width or Period.
Figure 25-5.
Diagram of Measure Pulse Width (9513) VI
The Measure Pulse Width or Period VI counts the number of cycles of the
specified timebase, depending on your choice from the type of
measurement menu located on the front panel of the VI. The type of
measurement menu choices for this VI are shown in Figure 25-6.
Figure 25-6.
Menu Choices for Type of Measurement
for the Measure Pulse Width or Period (9513) VI
Either menu choice can be used to measure the width of a single pulse, or
to measure a pulse within a train of multiple pulses. However, the pulse
must occur after the counter starts. This means it may be difficult to
measure a pulse within a fast pulse train. This is because the counter uses
high level gating. If the counter is started in the middle of a pulse, it will
measure the remaining width of that pulse.
The timebase you choose determines how long a pulse you can measure
with the 16-bit counter. For example, the 100 Hz timebase allows you to
measure a pulse up to 2
16
×
10ms = 655 seconds long. The 1 MHz timebase
allows you to measure a pulse up to 65 ms long. Since a faster timebase
yields a more accurate pulse width measurement, it is best to use the fastest
timebase possible without the counter reaching terminal count (TC).