Next: Coordinate System
Up: Servo System
Previous: Finding home
  Contents
Once the servo system has been properly initialized and homed,
it can be used to aim the laser to a target. The ZY does this
by loading the LM628 with the desired Azimuth and Elevation encoder
counts and issuing the LM628 STT command.
The ZY obtains the Azimuth and Elevation encoder counts for the
desired target in one of two ways:
- They are calculated from the
coordinates of the
retroreflector target (see
section 2.4).
- They are provided directly by the ZY's client
The LM628 will then
compute a trajectory to the destination and start the motors
moving. The LM628 will indicate that the move is complete by
issuing a Trajectory Complete Interrupt (TCI), which sets a flag
that the ZY looks for. Unfortunately the TCI tells only of a
completed move, which occurs when the servo crosses the
destination, not when it is settled on the destination.
It may take several more milliseconds for the servo to stabilize
in its new location, particularly if the LM628's PID filter
parameters are not just right. For a measurement to be successful,
the servo system must be on target, within a reasonable tolerance.
Thus, the ZY's measurement commands (CMEAS, SCN) call on the
servo system's LM628::ServoWait() routine to determine when it
is safe to start a measurement.
The ServoWait() routine works
as shown in figure 2.6. The ZY's client
can set a tolerance for the destination count (see WTOL).
For instance, if
the tolerance is 2 encoder counts, the servos will be considered
on target if their actual reading is the destination
counts.
If the ServoWait() routine can make
straight readings that are
within this tolerance, where
can be set by the ZY's
client (see WCNT), then
ServoWait() considers the servo to be ``on-target,'' and a measurement
can be made.
The ZY's client can also set other parameters that
affect the operation of ServoWait(): A time out value (WTMO),
and a strict flag (WMD). The time out value
causes the ServoWait() routine to
abandon the servo-wait procedure if the
straight in-tolerance
measurements cannot be made within the time-out period. The `strict'
flag affects the return value of ServoWait() if it times-out. If
`strict' is set, then ServoWait() returns failure if it times-out.
This should be the usual operation. If `strict' is not set, then
ServoWait() return 1 (success) even if it times out. This mode
of operation is useful for testing purposes, but probably should
not be used for normal operation.
Failure to settle within a reasonable time period is most probably
due to poor tuning parameters for the LM628's PID filter.
Some or all of the steps described above are performed automatically
by the ``cube-based'' pointing and measuring commands CIL, CMEAS,
CWT, and SCN. Even when using these commands, though, it is important
to understand how the system works, especially how the LM628::ServoWait()
routine and the PID filter parameters work, to tune the system for
maximum performance.
The above steps can also be explicitly performed by the
low level servo commands ABP, STT and WAI. These are provided for
special purposes or for testing the servo system.
Figure 2.6:
Flowchart for the ZY Servo System settling routine.
 |
Next: Coordinate System
Up: Servo System
Previous: Finding home
  Contents
Ramon E. Creager
2002-03-11