Duplicate count prevention, Figure 43. duplicate count prevention example, Section – National Instruments Eight-slot USB Chassis NI cDAQ-9172 User Manual

Page 71

Advertising
background image

© National Instruments Corporation

71

NI cDAQ-9172 User Guide and Specifications

Duplicate Count Prevention

Duplicate count prevention (or synchronous counting mode) ensures that a
counter returns correct data in applications that use a slow or non-periodic
external source. Duplicate count prevention applies only to buffered
counter applications such as measuring frequency or period. In such
buffered applications, the counter stores the number of times an external
Source pulses between rising edges on the Gate signal.

Example Application That Works Correctly
(No Duplicate Counting)

Figure 43 shows an external buffered signal as the period measurement
Source.

Figure 43. Duplicate Count Prevention Example

On the first rising edge of the Gate, the current count of seven is stored.
On the next rising edge of the Gate, the counter stores a two because
two Source pulses occurred after the previous rising edge of Gate.

The counter synchronizes or samples the Gate signal with the Source
signal, which means that the counter does not detect a rising edge in the
Gate until the next Source pulse. In this example, the counter stores the
values in the buffer on the first rising Source edge after the rising edge of
Gate. The details of when exactly the counter synchronizes the Gate signal
vary depending on the synchronization mode. Synchronization modes are
described in the

Synchronization Modes

section.

Gate

2
7

7

6 7 1

2

1

Rising Edge
of Gate

Counter detects rising edge
of Gate on the next rising
edge of Source.

Source

Counter Value

Buffer

Advertising