Chapter 9 CountersNI USB-621x User Manual 9-6 ni.comThe counter counts the number of edges on the Source input while the Gateinput remains active. On each trailing edge of the Gate signal, the counterstores the count in a hardware save register. A USB Signal Stream transfersthe stored values to host memory.Figure 9-7 shows an example of a buffered pulse-width measurement.Figure 9-7. Buffered Pulse-Width MeasurementNote that if you are using an external signal as the Source, at least oneSource pulse should occur between each active edge of the Gate signal.This condition ensures that correct values are returned by the counter. If thiscondition is not met, consider using duplicate count prevention, describedin the Duplicate Count Prevention section.For information about connecting counter signals, refer to the DefaultCounter/Timer Pinouts section.Period MeasurementIn period measurements, the counter measures a period on its Gate inputsignal after the counter is armed. You can configure the counter to measurethe period between two rising edges or two falling edges of the Gate inputsignal.You can route an internal or external periodic clock signal (with a knownperiod) to the Source input of the counter. The counter counts the numberof rising (or falling) edges occurring on the Source input between thetwo active edges of the Gate signal.You can calculate the period of the Gate input by multiplying the period ofthe Source signal by the number of edges returned by the counter.SOURCEGATECOUNTER VALUEBUFFER10 33 2212 3 32