National Instruments DAQ S Network Card User Manual


 
Chapter 7 Counters
NI 6124/6154 User Manual 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 Source edge, so no
value written to buffer.
Source
Gate
Buffer
Counter Value
0
7
7
6 7 0 1
Counter detects
rising Gate edge.
Counter value
increments only
one time for each
Source pulse.
Source
80 MHz Timebase
Gate
Buffer
Counter Value