Trajectory Programming Module - National Semiconductor LM628 Programming Manual

Table of Contents

Advertisement

I. Program Modules
Port
Bytes
Command
c
1E
LFIL
d
00
HB
d
x8
d
00
HB
d
0A
c
04
UDF
Comments
After executing both the example initialization and example
filter programming modules, the following observations are
made. Filter gain is nonzero, but desired shaft position con-
tinues to track actual shaft position. Under these conditions,
the motor drive signal remains at zero. The shaft should be
stationary and "free wheeling". If there is significant drive
amplifier offset, the shaft may rotate slowly, but with minimal
torque capability.
Initially, k
should be set below twenty, d
p
one, and k
, k
, and i
should remain at zero. These values
i
d
l
will not provide optimum system performance, but they will
be sufficient to test system functionality. See Tuning the PID
Filter.

TRAJECTORY PROGRAMMING MODULE

Table 5 details the example trajectory programming module.
Load Trajectory Parameters
An LTRJ (Load TRaJectory) command sequence includes
command LTRJ, a trajectory control word, and a variable
number of data words.
The LTRJ command initiates loading trajectory parameters
into input buffers.
The two data bytes, written immediately after LTRJ, com-
prise the trajectory control word. The first byte programs,
with logical ones in respective bit positions, the trajectory
mode (velocity or position), velocity mode direction, and
stopping mode. See Stop Module. The second byte indi-
cates, with logical ones in respective bit positions, which of
the three trajectory parameters will be loaded. It also indi-
cates whether the parameters are absolute or relative. See
Figure 9. Any combination of the three parameters can be
loaded within a single LTRJ command sequence.
Immediately following the trajectory control word, the trajec-
tory parameters are written. Each parameter is written as a
pair of data words (four data bytes). Because any combina-
tion of the three parameters can be loaded within a single
LTRJ command sequence, the number of data words follow-
ing the trajectory control word can vary in the range from
zero to six.
(Continued)
TABLE 4. Filter Programming Module
This command initiates loading the filter coefficients input buffers.
Busy-bit Check Module
These two bytes are the filter control word. A 00 hex HB sets the derivative sampling
LB
interval to 2048/f
CLK
The other filter parameters will remain at zero, their reset default value.
Busy-bit Check Module
These two bytes set k
LB
Busy-bit Check Module
This command transfers new filter coefficients from input buffers to working registers.
Until UDF is executed, coefficients loaded via the LFIL command do not affect the filter
transfer characteristic.
Busy-bit Check Module
should be set to
s
Comments
by setting d
to one. A x8 hex LB indicates only k
s
to ten.
p
In the case of the example module, the first byte of the
trajectory control word, 00 hex, programs the LM628 to
operate in position mode. The second byte, 0A hex, indi-
cates velocity and position will be loaded and both param-
eters are absolute. Four data words, two for each parameter
loaded, follow the trajectory control word.
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.
Note: At this point no actual trajectory parameters are loaded. Calculation of
trajectory parameters and execution of example moves is left for a
later section.
FIGURE 9. Trajectory Control Word Bit Allocation
7
will be loaded.
p
high byte
low byte
www.national.com
01086011
01086012

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lm629

Table of Contents