Loop Phasing Program; Simple Absolute Position Move - National Semiconductor LM628 Programming Manual

Table of Contents

Advertisement

I. Program Modules
Port
Bytes
Command
c
1F
LTRJ
d
x1
HB
d
00
c
01
STT
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 Table 7, 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.
Port
Bytes
Command
c
1F
LTRJ
d
00
HB
d
00
c
01
STT
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
Figure 7. 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-
(Continued)
TABLE 6. Stop Module (Motor-Off)
This command initiates loading the trajectory parameters input buffers.
Busy-bit Check Module
These two bytes are the trajectory control word. A x1 hex HB selects motor-off as the
LB
desired stopping mode. A 00 hex LB indicates no trajectory parameters will be loaded.
Busy-bit Check Module
The start motion control command, STT, must be executed to stop shaft motion.
Busy-bit Check Module
TABLE 7. Loop Phasing Program
Initialization Module
Filter Programming Module
This command initiates loading the trajectory parameters input buffers.
Busy-bit Check Module
These two bytes are the trajectory control word. A 00 hex LB indicates no trajectory
LB
parameters will be loaded.
Busy-bit Check Module
STT must be issued to execute the desired trajectory.
Comments
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.
Comments
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
Table 8, 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
reaches a maximum velocity of 0.2 rev/sec, and then decel-
erate to a stop exactly two revolutions from the starting
position. See Figure 10.
9
2
until it
www.national.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lm629

Table of Contents