Chapter 8
Counters
8-18
ni.com
Two-Signal Edge-Separation Measurement
Two-signal edge-separation meas
u
rement is similar to p
u
lse-width
meas
u
rement, except that there are two meas
u
rement signals—A
u
x and
Gate. An active edge on the A
u
x inp
u
t starts the co
u
nting and an active
edge on the Gate inp
u
t stops the co
u
nting. Yo
u
m
u
st arm a co
u
nter to begin
a two edge separation meas
u
rement.
After the co
u
nter has been armed and an active edge occ
u
rs on the A
u
x
inp
u
t, the co
u
nter co
u
nts the n
u
mber of rising (or falling) edges on the
So
u
rce. The co
u
nter ignores additional edges on the A
u
x inp
u
t.
The co
u
nter stops co
u
nting
u
pon receiving an active edge on the Gate inp
u
t.
The co
u
nter stores the co
u
nt in a hardware save register.
Yo
u
can config
u
re the rising or falling edge of the A
u
x inp
u
t to be the active
edge. Yo
u
can config
u
re the rising or falling edge of the Gate inp
u
t to be
the active edge.
Use this type of meas
u
rement to co
u
nt events or meas
u
re the time that
occ
u
rs between edges on two signals. This type of meas
u
rement is
sometimes referred to as start/stop trigger meas
u
rement, second gate
meas
u
rement, or A-to-B meas
u
rement.
Single Two-Signal Edge-Separation Measurement
With single two-signal edge-separation meas
u
rement, the co
u
nter co
u
nts
the n
u
mber of rising (or falling) edges on the So
u
rce inp
u
t occ
u
rring
between an active edge of the Gate signal and an active edge of the A
u
x
signal. The co
u
nter then stores the co
u
nt in a hardware save register and
ignores other edges on its inp
u
ts. Software then reads the stored co
u
nt.