II. Programs
(Continued)
Note:
Absolute position is position measured relative to zero (home). An
absolute position move is a move that ends at a specified absolute
position. For example, independent of the current absolute position of
the shaft, if an absolute position of 30,000 counts is specified, upon
completion of the move the absolute position of the shaft will be 30,000
counts (i.e. 30,000 counts relative to zero). The example program calls
for a position move of two revolutions. Because the starting absolute
position is 0 counts, the move is accomplished by specifying an
absolute position of 8000 counts. See
.
The Quadrature Incremental Encoder
As a supplement to the trajectory parameters calculations, a
brief discussion is provided here to differentiate between
encoder
lines
and encoder
counts
.
A quadrature incremental shaft encoder encodes shaft rota-
tion as electrical pulses.
details the signals gener-
ated by a 3-channel quadrature incremental encoder. The
LM628 decodes (or “counts”) a quadrature incremental sig-
nal to determine the absolute position of the shaft.
The resolution of a quadrature incremental encoder is usu-
ally specified as a number of
lines
. This number indicates
the number of cycles of the output signals for each complete
shaft revolution. For example, an N-line encoder generates
N cycles of its output signals during each complete shaft
revolution.
By definition, two signals that are in quadrature are 90˚ out of
phase. When considered together, channels A and B (
) traverse four distinct digital states during each full cycle
of either channel. Each state transition represents one
count
of shaft motion. The leading channel indicates the
direction of shaft rotation.
Each line, therefore, represents one cycle of the output
signals, and each cycle represents four encoder counts.
The reference system uses a one thousand line encoder.
Sample Period
Sampling of actual shaft position occurs at a fixed frequency,
the reciprocal of which is the system sample period. The
system sample period is the unit of time upon which shaft
acceleration and velocity are based.
The reference system uses an 8 MHz clock. The sample
period of the reference system follows directly from the
definition.
Trajectory Parameters Calculations
The shaft will accelerate at 0.1 rev/sec
2
until it reaches a
maximum velocity of 0.2 rev/sec, and then decelerate to a
stop exactly two revolutions from the starting position.
Trajectory parameters calculations for this move are detailed
in
.
Comments
After completing the move, the control system will attempt to
hold the shaft at its current absolute position. The shaft will
feel lightly “spring loaded”. If forced away from its desired
resting position and released, the shaft will move back to the
desired position.
01086013
FIGURE 10. Velocity Profile for Simple
Absolute Position Move Program
01086014
FIGURE 11. 3-Channel Quadrature Encoder Signals
AN-693
www.national.com
10