Chapter 8 Counters
NI USB-621x User Manual 8-34 ni.com
Other Counter Features
Sample Clock
When taking counter measurements, you can enable a sample clock. When 
you use a sample clock, measurements are saved after an active edge of the 
sample clock. Figure 8-30 shows an example of using a sample clock with 
a buffered period measurement. In this example, a period is defined by 
two consecutive rising edges of the Gate. 
Figure 8-30.  Sample Clock Example
t
0
At t
0
, the counter is armed. No measurements are taken until the counter is armed.
t
1
The rising edge of Gate indicates the beginning of the first period to measure. The counter begins counting 
rising edges of Source.
t
2
The rising edge of Sample Clock indicates that the USB-621x device should store the result of the measurement 
of the current period when the period ends.
t
3
The rising edge of Gate indicates the end of the first period. The USB-621x device stores the counter value in 
the buffer.
t
4
The rising edge of Gate indicates the end of the second period. Sample Clock did not assert during this period, 
so the counter discards the measurement of the second period.
t
5
The rising edge of Gate indicates the end of the third period. Sample Clock asserts during this period, so the 
USB-621x device stores the measurement in the buffer.
SOURCE
GATE
Buffer
4
Counter Armed
Sample Clock
4
4
3
Time N
Counter Value
t
0
t
1
t
2
t
3
t
4
t
5
123 41 2 12 3 1