Chapter 7
Counters
7-10
ni.com
Buffered Semi-Period Measurement
In buffered semi-period measurement, on each edge of the Gate signal, the
counter stores the count in a hardware save register. A DMA controller
transfers the stored values to host memory.
The counter begins counting when it is armed. The arm usually occurs
between edges on the Gate input. So the first value stored in the hardware
save register does not reflect a full semi-period of the Gate input. In most
applications, this first point should be discarded.
Figure 7-10 shows an example of a buffered semi-period measurement.
Figure 7-10.
Buffered Semi-Period Measurement
Note that if you are using an external signal as the Source, at least one
Source pulse should occur between each active edge of the Gate signal.
This condition ensures that correct values are returned by the counter. If this
condition is not met, consider using duplicate count prevention.
For information on connecting counter signals, refer to the
section.
Frequency Measurement
You can use the counters to measure frequency in several different ways.
You can choose one of the following methods depending on your
application.
Method 1—Measure Low Frequency with One
Counter
In this method, you measure one period of your signal using a known
timebase. This method is good for low frequency signals.
3
1
2
2
3
1
2
2
3
2
SOURCE
GATE
Counter Value
Buffer
1
3
2
2
1
1
1
3
2
1
2
1
0
2
Counter Armed