Chapter 8
Counters
©
National Instruments Corporation
8-3
Figure 8-3.
Single Point (On-Demand) 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