Chapter 8
Counters
8-8
ni.com
Note that if yo
u
are
u
sing an external signal as the So
u
rce, at least one
So
u
rce p
u
lse sho
u
ld occ
u
r between each active edge of the Gate signal.
This condition ens
u
res that correct val
u
es are ret
u
rned by the co
u
nter. If this
condition is not met, the co
u
nter ret
u
rns a zero. Refer to the
For information abo
u
t connecting co
u
nter signals, refer to the
section.
Semi-Period Measurement
In semi-period meas
u
rements, the co
u
nter meas
u
res a semi-period on its
Gate inp
u
t signal after the co
u
nter is armed. A semi-period is the time
between any two consec
u
tive edges on the Gate inp
u
t.
Yo
u
can ro
u
te an internal or external periodic clock signal (with a known
period) to the So
u
rce inp
u
t of the co
u
nter. The co
u
nter co
u
nts the n
u
mber
of rising (or falling) edges occ
u
rring on the So
u
rce inp
u
t between
two edges of the Gate signal.
Yo
u
can calc
u
late the semi-period of the Gate inp
u
t by m
u
ltiplying the
period of the So
u
rce signal by the n
u
mber of edges ret
u
rned by the co
u
nter.
Single Semi-Period Measurement
Single semi-period meas
u
rement is eq
u
ivalent to single p
u
lse-width
meas
u
rement.