Download DAQ basics

Transcript
Chapter 28
Counting Signal Highs and Lows
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.
Am9513
The Count Events-Easy (9513) VI, located in labview\examples\daq\
counter\Am9513.llb, uses the Easy VI, Count Events or Time, which
can be found in Functions»Data Acquisition»Counter.
This VI initiates the counter to count the number of rising edges of a
TTL signal at the SOURCE of counter. The counter continues counting
until you click the STOP button. You must externally wire your signal to
be counted to the SOURCE of counter. Additionally, you can cascade two
counters by choosing two counters (32-bits) in the number of counters to
use menu. This extends your counting range to over 4 billion. You also
must wire the OUT of counter to the SOURCE of counter+1 for this
increased counting range. For a complete description of this example, refer
to the information found in Windows»Show VI Info.
If you need more control over when your event counting begins and
ends, use the Intermediate VIs instead of the Easy VIs. For an example,
open the Count Events-Int (9513) VI located in labview\examples\
daq\counter\Am9513.llb.
This example uses the 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 you
click the STOP button or an error occurs. Finally, the Counter Stop VI
stops the counter operation. You must externally wire your signal to be
counted to the SOURCE of counter. You optionally can 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. Additionally, you can cascade two counters by
choosing two counters (32-bits) in the number of counters to use menu.
This extends your counting range to over 4 billion. You also must wire the
OUT of counter to the SOURCE of counter+1 for this increased counting
range. For a complete description of this example, read the information
found in Window»Show VI Info.
LabVIEW Data Acquisition Basics Manual
28-4
www.ni.com