Chapter 8
Counters
©
National Instruments Corporation
8-17
high d
u
ring at least a portion of the phase yo
u
specify for reload. For
instance, in Fig
u
re 8-17, channel Z is never high when channel A is high
and channel B is low. Th
u
s, the reload m
u
st occ
u
r in some other phase.
In Fig
u
re 8-17, the reload phase is when both channel A and channel B are
low. The reload occ
u
rs when this phase is tr
u
e and channel Z is high.
Incrementing and decrementing takes priority over reloading. Th
u
s, when
the channel B goes low to enter the reload phase, the increment occ
u
rs first.
The reload occ
u
rs within one maxim
u
m timebase period after the reload
phase becomes tr
u
e. After the reload occ
u
rs, the co
u
nter contin
u
es to co
u
nt
as before. The fig
u
re ill
u
strates channel Z reload with X4 decoding.
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
Figure 8-18.
Measurements Using Two Pulse Encoders
For information abo
u
t connecting co
u
nter signals, refer to the
section.
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