III. Tuning the PID Filter
(Continued)
TABLE 12. Step Generation Section — Filter Tuning Program
Port
Bytes
Command
Comments
c
1F
LTRJ
This command initiates loading the trajectory parameters input buffers.
Busy-bit Check Module
d
d
00
2B
HB
LB
These two bytes are the trajectory control word. A 2B hex LB indicates acceleration,
velocity, and position will be loaded and both acceleration and velocity are absolute
while position is relative.
Busy-bit Check Module
d
d
00
04
HB
LB
Acceleration is loaded in two data words. These two bytes are the high data word.
Busy-bit Check Module
d
93
HB
acceleration data word (low)
d
E0
LB
Busy-bit Check Module
d
d
00
07
HB
LB
Velocity is loaded in two data words. These two bytes are the high data word.
Busy-bit Check Module
d
A1
HB
velocity data word (low)
d
20
LB
Busy-bit Check Module
d
d
00
00
HB
LB
Position is loaded in two data words. These two bytes are the high data word.
Busy-bit Check Module
d
00
HB
position data word (low)
d
C8
LB
Busy-bit Check Module
c
01
STT
STT must be issued to execute the desired trajectory.
Busy-bit Check Module
c
xx
RDSTAT
This command reads the Status Byte. It is directly supported by LM628 hardware and
can be executed at any time by pulling CS, PS, and RD logic low. Status information
remains valid as long as RD is logic low.
decision
If the Trajectory Complete interrupt bit is set, continue. Otherwise loop back to RDSTAT.
c
1D
RSTI
This command resets
only
the interrupts indicated by zeros in bits one through six of
the next data word. It also resets bit fifteen of the Signals Register and the host
interrupt pin (pin 17).
d
xx
HB
don’t care
d
00
LB
Zeros in bits one through six indicate
all
interrupts will be reset.
wait
This wait block inserts a delay between repetitions of the step input. The delay is
application specific, but a good range of values for the delay is 5 ms to 5000 ms.
loop
Loop back to STT.
Hardware Considerations
For a motor control system, an oscilloscope trace of the
system step response is a graph of the real position of the
shaft versus time after a small and instantaneous change in
desired position.
For an LM628-based system, no extra hardware is needed
to view the system step response. During a step, the voltage
across the motor represents the system step response, and
an oscilloscope is used to generate a graph of this response
(voltage).
For an LM629-based system, extra hardware is needed to
view the system step response.
illustrates a circuit
for this purpose. During a step, the voltage output of this
circuit represents the system step response, and an oscillo-
scope is used to generate a graph of this response.
The oscilloscope trigger signal, a rectangular pulse train, is
taken from the host interrupt output pin (pin 17) of the
LM628/LM629. This signal is generated by the combination
of a trajectory complete interrupt and a reset interrupts
(RSTI) command. See
.
Note:
The circuit of
can be used to view the step response of an
LM628-based system.
AN-693
www.national.com
22