Next: Resetting the LM628
Up: System Overview
Previous: ZY ranger software
  Contents
The ZY servo system's function is to position a beam steering mirror in
one of three modes (see figure 2.1):
- illuminate a target retroreflector with the instrument's laser beam
- aim a retroreflector on the back of the mirror mount toward
another ranger
- aim the main mirror toward another ranger.
Each axis of the ZY servo system
consists of a DC servo motor with a Heidenhain Corporation 100,000
count per revolution (interpolated) incremental encoder, a 21
kHz pulse width modulated servo amplifier, and a 6 MHz National
Semiconductor LM628 Precision Motion
Controller[11][12].
The ZY controls the two LM628 axis controllers
using 2 software objects of class LM628 (an ``azimuth'' object and
an ``elevation'' object). Class LM628 encapsulates
all the functionality
of the LM628 controller.
Earlier versions of the ZY software would monitor the operation
of the LM628s by polling them. Since early prototypes of the
ZY hardware used the faster 8 MHz version of the LM628 and
relatively slow 10 MHz i286 Single Board Computers (SBC), this presented
no problems. But later, because of cost considerations, we
switched to slower 6 MHz LM628 controllers, and as the SBCs became
faster, polling was found to be detrimental: despite the use of the
LM628 busy bit[12], the LM628 was so busy
responding to the polling requests that it would miss encoder
counts, thus losing its zero point. To remedy this, completion events
for the LM628 objects are now handled by ISRs, one for each object. When
an LM628 event occurs, the IRQ for that controller asserts, and the
ISR then sets event flags in the object whose axis asserted the IRQ.
This eliminates polling for all but a couple of functions. (These
are: finding
home and checking for settling. In these cases, a 1 mS delay is
introduced to avoid over-polling).
Before the servos can be used to aim the laser beam to a target,
the ZY (or its client) must ensure that the following steps are
taken:
- Reset and initialize the LM628 motion controllers.
- Load the PID and Acceleration/Velocity values for the
LM628 motion controllers.
- Turn on the axis amplifiers.
- Find home.
Once these steps have been performed, the servo system is ready
to perform its function.
Subsections
Next: Resetting the LM628
Up: System Overview
Previous: ZY ranger software
  Contents
Ramon E. Creager
2002-03-11