![background image](http://html1.mh-extra.com/html/national-instruments/usb-6210/usb-6210_user-manual_3656406115.webp)
Chapter 8
Counters
8-18
ni.com
Figure 8-17.
Channel Z Reload with X4 Decoding
Measurements Using Two Pulse Encoders
The co
u
nter s
u
pports two p
u
lse encoders that have two channels—channels
A and B.
The co
u
nter increments on each rising edge of channel A. The co
u
nter
decrements on each rising edge of channel B, as shown in Fig
u
re 8-18.
Figure 8-18.
Measurements Using Two Pulse Encoders
For information abo
u
t connecting co
u
nter signals, refer to the
section.
Buffered (Sample Clock) Position Measurement
With b
u
ffered position meas
u
rement (position meas
u
rement
u
sing a
sample clock), the co
u
nter increments based on the encoding
u
sed after the
co
u
nter is armed. The val
u
e of the co
u
nter is sampled on each active edge
of a sample clock. A DMA controller transfers the sampled val
u
es to host
memory. The co
u
nt val
u
es ret
u
rned are the c
u
m
u
lative co
u
nts since the
co
u
nter armed event; that is, the sample clock does not reset the co
u
nter.
Yo
u
can ro
u
te the co
u
nter sample clock to the Gate inp
u
t of the co
u
nter.
Yo
u
can config
u
re the co
u
nter to sample on the rising or falling edge of the
sample clock.
Ch A
Ch B
Co
u
nter V
a
l
u
e
5 6
A = 0
B = 0
Z = 1
Ch Z
M
a
x Time
bas
e
8 9 0
2
1
7 4
3
Ch A
Ch B
Co
u
nter V
a
l
u
e 2
3
5
4
3
4 4