Programming instructions
Chapter 27 Counting Signal Highs and Lows
LabVIEW Data Acquisition Basics Manual 27-4
©
National Instruments Corporation
If you need more control over when your event counting begins and ends,
use the Intermediate VIs instead of the Easy VIs. Figure 27-6 shows the
Count Events-Int (DAQ-STC) VI located in
labview\examples\
daq\DAQ-STC.llb
.
Figure 27-6.
Diagram of Count Events-Int (DAQ-STC) VI
This example uses the following Intermediate VIs: Event or Time Counter
Config, Counter Start, Counter Read, and Counter Stop. The Event or Time
Counter Config VI configures
counter
to count the number of rising edges
of a TTL signal at its SOURCE input pin. The Counter Start VI begins the
counting operation for
counter
. The Counter Read VI returns the count
until the
STOP
button is pressed or an error occurs. Finally, the Counter
Stop VI stops the counter operation. Remember that you must externally
wire your signal to be counted to the SOURCE of
counter
. You can
optionally gate
counter
with a pulse to control when it starts and stops
counting. To do this, wire your pulse to the GATE of counter, and choose
the appropriate
gate mode
from the front panel menu. For a complete
description of this example, refer to the information found in
Windows»Show VI Info…
.
Am9523
Figure 27-7 shows the Count Events-Easy (9513) VI located in
labview\examples\daq\Am9513.llb
. This example uses the
Count Events or Time-Easy VI which can be found in
Functions»
Data Acquisition»Counter
.










