SERIES AP48X ACROPACK
USER
’S MANUAL
Acromag, Inc. Tel: 248-295-0310
- 34 -
- 34 -
https://www.acromag.com
Quadrature Position Measurement
The counter/timers may be used to perform position measurements from
quadrature motion encoders. Bits 2 to 0 of the Counter Control Register set
to logic ”001” configure the counter for quadrature measurement.
A quadrature encoder can have up to three channels: A, B, and Index. When
channel A leads channel B by 90
in a quadrature cycle, the counter
increments. When channel B leads channel A by 90
in a quadrature cycle,
the counter decrements. The number of increments or decrements per
cycle depends on the type of encoding: X1, X2, or X4.
Figure 3.1 Quadrature Cycles with X4 Encoding
An X1 encoding Increment occurs on the rising edge of channel A when
channel A leads channel B. An X1 encoding decrement occurs on the falling
edge of channel A when channel B leads channel A.
For X2 encoding, two increments or decrements (on each edge of channel A)
result from each cycle. The counter increments when A leads B and
decrements when B leads A.
For X4 encoding, four increments or decrements (on each edge of channel A
and B) result from each cycle. The counter increments when A leads B and
decrements when B leads A.
Quadrature measurement must be triggered internally via the Counter
Trigger Register. An initial software trigger starts quadrature position
measurement operation.
InA and InB input signals are used to input the channel A and channel B
input signals, respectively. The counter will increment when channel A leads
channel B and will decrement when channel B leads channel A. Three rates
of increments and decrements are available X1, X2, and X4 which are
programmed via counter timer control register bits 5 and 4. Channel B is
enabled for input by setting bit-
6 to a logic “1”.
4