Chapter 8
Counters
8-38
ni.com
the first rising So
u
rce edge after the rising edge of Gate. The details of
when exactly the co
u
nter synchronizes the Gate signal vary depending
on the synchronization mode.
Example Application That Works Incorrectly
(Duplicate Counting)
In Fig
u
re 8-34, after the first rising edge of Gate, no So
u
rce p
u
lses occ
u
r,
so the co
u
nter does not write the correct data to the b
u
ffer.
Figure 8-34.
Duplicate Count Example
Example Application That Prevents Duplicate Count
With d
u
plicate co
u
nt prevention, the co
u
nter synchronizes both the So
u
rce
and Gate signals to the 80 MHz Timebase. By synchronizing to the
timebase, the co
u
nter detects edges on Gate even if the So
u
rce does not
p
u
lse. This enables the correct c
u
rrent co
u
nt to be stored in the b
u
ffer even
if no So
u
rce edges occ
u
r between Gate signals, as shown in Fig
u
G
a
te
S
o
u
rce
Co
u
nter V
a
l
u
e
B
u
ffer
7
6 7
1
No
S
o
u
rce edge,
s
o no
v
a
l
u
e written to
bu
ffer.