Causes the specified axis to set its home position at the
encoder's index pulse position.
Mnemonic:
Find HoMe
Syntax:
FHM n
n: Axis number (0:azimuth, 1:elevation).
Return values:
Success:
FHM 1, n
Failure:
FHM 0[, n], err_msg
n: Axis number.
err_msg: Should the command fail, this value will
be an error message string, explaining the cause of failure.
FHM has two basic failure modes. The first is if improper
parameters are given it. In this case, FHM returns the
failure code and an error message. The second is if the
axis actually failed to find home for any reason. FHM then
returns the failure code, the axis number, and then the
error message. FHM may fail for any of the following
reasons:
The wrong number of parameters were supplied.
A non-numeric value is provided for any of the parameters.
The axis number in n is not `0' or `1'.
The axis failed to find home. This could indicate
problems with the LM628 tuning parameters, or hardware
problems with the encoder, such as a miswired index pulse
line or other defect.
Remarks:
The servo system must be homed prior to any use that
requires absolute encoder coordinates. Once homed, the servo
system need not be homed again unless the LM628 controller chip
is reset or in the unlikely event that it should lose count.
The `homed' status of each axis can be determined by reading the
system status word.
The find home operation works by moving the servo until the index
pulse is detected or until it has moved one full revolution. Upon
detecting the index pulse, the position counter reading is latched
into the index position register and the servo is moved back to this
position. When the servo has settled on this position, the position
register is cleared to zero. Encoder counts can subsequently be
treated as absolute encoder coordinates.
FHM attempts to complete the find home operation within 30 seconds.
It can fail to do so if the servos do not move, if the index pulse
is not detected within one full revolution, or if the servos cannot
settle on the index pulse position. If FHM fails, or if FHM is never
executed, operations that require absolute coordinates will also
fail, with an error message indicating that the servos are not
`homed.'