Programming instructions

Chapter 25 Measuring Pulse Width
©
National Instruments Corporation 25-3 LabVIEW Data Acquisition Basics Manual
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-4.
Figure 25-4.
Menu Choices for Type of Measurement
for the Measure Pulse Width or Period(DAQ-STC) VI
Use the first two menu choices when you want to measure the width of a
single pulse. In these cases, the GATE of the counter must start out in the
opposite phase of the pulse you want to measure. For example, if you
choose
measure high pulse width of a single pulse
, the GATE must start
out low when you run the VI. If you attempt to measure a single high pulse,
and the GATE is already high (such as in the middle of a pulse train) when
you run the VI, an error will occur.
Use the last two menu choices when you want to measure the width of a
single pulse within a train of multiple pulses. In these cases, it is the
previous GATE transition which arms the counter to measure the next
pulse. For example, if you choose
measure one high pulse width of
multiple pulses
, the first high-to-low GATE transition from one pulse
would arm the counter to measure the very next pulse.
The timebase you choose determines how long a pulse you can measure
with the 24-bit counter. For example, the 100 kHz timebase allows you to
measure a pulse up to 2
24
×
10
µ
s = 167 seconds long. The 20 MHz timebase
allows you to measure a pulse up to 838 ms long. For a complete
description of this example, refer to the information found in
Windows»Show VI Info…
.