Chapter 7
Counters
7-36
ni.com
Example Application That Works Incorrectly
(Duplicate Counting)
In Figure 7-33, after the first rising edge of Gate, no Source pulses occur,
so the counter does not write the correct data to the buffer.
Figure 7-33.
Duplicate Count Example
Example Application That Prevents Duplicate Count
With duplicate count prevention enabled, the counter synchronizes both the
Source and Gate signals to the 80 MHz Timebase. By synchronizing to the
timebase, the counter detects edges on the Gate even if the Source does not
pulse. This enables the correct current count to be stored in the buffer even
if no Source edges occur between Gate signals, as shown in Figure 7-34.
Figure 7-34.
Duplicate Count Prevention Example
7
6 7
1
No
S
o
u
rce edge,
s
o no
v
a
l
u
e written to
bu
ffer.
S
o
u
rce
G
a
te
B
u
ffer
Co
u
nter V
a
l
u
e
0
7
7
6 7
0
1
Co
u
nter detect
s
ri
s
ing G
a
te edge.
Co
u
nter v
a
l
u
e
increment
s
only
one time for e
a
ch
S
o
u
rce p
u
l
s
e.
S
o
u
rce
80 MHz Time
bas
e
G
a
te
B
u
ffer
Co
u
nter V
a
l
u
e