I. Program Modules
(Continued)
TABLE 6. Stop Module (Motor-Off)
Port
Bytes
Command
Comments
c
1F
LTRJ
This command initiates loading the trajectory parameters input buffers.
Busy-bit Check Module
d
d
x1
00
HB
LB
These two bytes are the trajectory control word. A x1 hex HB selects motor-off as the
desired stopping mode. A 00 hex LB indicates no trajectory parameters will be loaded.
Busy-bit Check Module
c
01
STT
The start motion control command, STT, must be executed to stop shaft motion.
Busy-bit Check Module
II. Programs
This section focuses on the development of four brief LM628
programs.
LOOP PHASING PROGRAM
Following initial power-up, the correct polarity of the motor
drive signal must be determined. If the polarity is incorrect
(loop inversion), the drive signal will push the shaft away
from its desired position rather than towards it. This results in
“motor runaway”, a condition characterized by the motor
running continuously at high speed.
The loop phasing program, detailed in
, contains both
the example initialization and filter programming modules. It
also contains an LTRJ command sequence and an STT
command.
Note:
Execution of this simple program is only required the
first
time a new
system is used.
Load Trajectory Parameters
An LTRJ (Load TRaJectory) command sequence includes
command LTRJ, a trajectory control word, and a variable
number of data words.
In the case of the Loop Phasing Program, the first byte of the
trajectory control word, 00 hex, programs the LM628 to
operate in position mode. The second byte, 00 hex, indicates
no trajectory parameters will be loaded (i.e. in this program,
zero data words follow the trajectory control word). The three
trajectory parameters will remain at zero, their reset value.
Start Motion Control
The start motion control command, STT (STarT), transfers
new trajectory parameters from input buffers to working reg-
isters and begins execution of the new trajectory. Until STT is
executed, the new trajectory parameters do not affect shaft
motion.
TABLE 7. Loop Phasing Program
Port
Bytes
Command
Comments
Initialization Module
Filter Programming Module
c
1F
LTRJ
This command initiates loading the trajectory parameters input buffers.
Busy-bit Check Module
d
d
00
00
HB
LB
These two bytes are the trajectory control word. A 00 hex LB indicates no trajectory
parameters will be loaded.
Busy-bit Check Module
c
01
STT
STT must be issued to execute the desired trajectory.
Comments
Execution of command STT results in execution of the de-
sired trajectory. With the acceleration set at zero, the profile
generator generates a desired shaft position that is both
constant and equal to the current absolute position. See
. Under these conditions, the control system will
attempt to hold the shaft at its current absolute postion. The
shaft will feel lightly “spring loaded”. If forced (CAREFULLY)
away from its desired position and released, the shaft will
spring back to the desired position.
If the polarity of the motor drive signal is incorrect (loop
inversion), motor runaway will occur immediately after ex-
ecution of command STT, or after the shaft is forced (CARE-
FULLY) from its resting position.
Loop inversion can be corrected with one of three methods:
interchanging the shaft position encoder signals (channel A
and channel B), interchanging the motor power leads, or
inverting the motor command signal before application to the
motor drive amplifier. For LM629 based systems, loop inver-
sion can be corrected by interchanging the motor power
leads, interchanging the shaft position encoder signals, or
logically inverting the PWM sign signal.
SIMPLE ABSOLUTE POSITION MOVE
The Simple Absolute Position Move Program, detailed in
, utilizes both the initialization and filter programming
modules, as well as, an LTRJ command sequence and an
STT command.
Factors that influenced the development of this program
included the following: the program must demonstrate
simple trajectory parameters calculations, the program must
demonstrate the programming flow required to load and
execute an absolute position move, and correct completion
of the move must be verifiable through simple observation.
Move:
The shaft will accelerate at 0.1 rev/sec
2
until it
reaches a maximum velocity of 0.2 rev/sec, and then decel-
erate to a stop exactly two revolutions from the starting
position. See
AN-693
www.national.com
9