Chapter 8
Counters
©
National Instruments Corporation
8-3
Yo
u
can ro
u
te the pa
u
se trigger to the Gate inp
u
t of the co
u
nter. Yo
u
can
config
u
re the co
u
nter to pa
u
se co
u
nting when the pa
u
se trigger is high or
when it is low. Fig
u
re 8-3 shows an example of on-demand edge co
u
nting
with a pa
u
se trigger.
Figure 8-3.
Single Point Edge Counting with Pause Trigger
Buffered (Sample Clock) Edge Counting
With b
u
ffered edge co
u
nting (edge co
u
nting
u
sing a sample clock), the
co
u
nter co
u
nts the n
u
mber of edges on the So
u
rce inp
u
t after the co
u
nter is
armed. The val
u
e of the co
u
nter is sampled on each active edge of a sample
clock. A USB Signal Stream transfers the sampled val
u
es to host memory.
The co
u
nt val
u
es ret
u
rned are the c
u
m
u
lative co
u
nts since the co
u
nter
armed event; that is, the sample clock does not reset the co
u
nter.
Yo
u
can ro
u
te the co
u
nter sample clock to the Gate inp
u
t of the co
u
nter. Yo
u
can config
u
re the co
u
nter to sample on the rising or falling edge of the
sample clock.
Fig
u
re 8-4 shows an example of b
u
ffered edge co
u
nting. Notice that
co
u
nting begins when the co
u
nter is armed, which occ
u
rs before the first
active edge on Gate.
Figure 8-4.
Buffered (Sample Clock) Edge Counting
Co
u
nter Armed
S
OURCE
P
aus
e Trigger
(P
aus
e when Low)
Co
u
nter V
a
l
u
e
1
0 0
5
4
3
2
3
6
3
Co
u
nter Armed
S
OURCE
Sa
mple Clock
(
Sa
mple on Ri
s
ing Edge)
Co
u
nter V
a
l
u
e
B
u
ffer
1
0 7
6
3
4 5
2