Chapter 7 Counters
NI 6238/6239 User Manual 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 Default Counter
Terminals 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
13
2
2
11
132
121
0
2
Counter Armed