Figure 7-33. duplicate count example, Example application that prevents duplicate count, Figure 7-34. duplicate count prevention example – National Instruments Network Device DAQ S User Manual

Page 108

Advertising
background image

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

Advertising