beautypg.com

Other counter features, Sample clock, Figure 8-28. sample clock example – National Instruments Data Acquisition Device NI USB-621x User Manual

Page 125: Other counter features -32, Sample clock -32

background image

Chapter 8

Counters

NI USB-621x User Manual

8-32

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-28 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-28. 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

1

2

3

4

1

2

1

2

3

1