The ability to stow the telescope is built into the drive-system
hardware. This allows one to stow the telescope via a physical switch
in the telescope teepee, even if the control computer isn't
working. The telescope can also be sent to the stow position, by
entering the stow
command into the
telviewer
command window. This tells the computer to hand
control over to the hardware that actually stows the telescope.
When using the stow
command to stow
the telescope, the operator should first suspend the currently running
schedule, if any. If this isn't done, then the current schedule is
likely to immediately cancel the stow and resume observing.
service
command. The current
schedule should be suspended before going to the service position.
Beware that the service position is at the hard lower elevation limit. At this position, the drive hardware does not allow computer servo control of the elevation drive. So if you attempt to enable the drive servos and slew the telescope away from this elevation, then the result will be an underspeed error, which will disable computer control of the telescope drives, and require an explicit reset of the drive servos, once the telescope has been moved away from the limit. So to move away from the service position, it is best to first initiate a stow, which is done under hardware control, then wait until this moves the telescope above the 7 degree software elevation limit, before attempting to enable the drive servos.
slew
and track
commands, then
these commands usually automatically enable the drives for
you. However this is not done if a previous drive error disabled
the drive servos. In such cases the drive servos must be enabled
explicitly, using the axes
command. This precaution
is to prevent a schedule that doesn't notice that the drive
servos went offline, from continuously entering motion commands
that attempt to re-enable the drive servos, since this could
damage the telescope if the drive error is serious.
axes all
command attempts
to enable the drive servos, and then restart whatever motion
command was running when the drive servos were previously
disabled. After a drive error, this command is the only way to
force the control system to try to re-enable the drive servos.
axes
command until it has verified that it is okay to
do so, by querying the state of the drives using
the $drives_available()
function. In addition to this requirement preventing the schedule from
futilely attempting to enable the drive servos during wind-stows, it
also prevents it from resetting the drives after a drive error has
occurred. This is important, because the drive error may have been a
condition that would damage the telescope if the drives were again
enabled.
The correct way to enable the drives automatically in schedules, is to
invoke the enable_drives
command, which is a script
command defined in schedlib.sch
. This does the following:
$drives_available()
function
indicates that the drives are online and available for observing.
$drives_enabled()
function indicates that the computer drive servos are not
currently enabled, then the following is done to enable them.
halt
command is issued, to
ensure that when the axes are enabled, the telescope is left
halted.
axes all
command is used
to enable the computer drive servos.
axes
command is awaited.
axes
command to fail,
then an error message is output to the log, and
the enable_drives
command waits indefinitely until
the operator manually enables the drive servos. It does this by
watching for the
$drives_enabled()
function to indicate that the computer drive servos have been
successfully enabled.
enable_drives
,
indicating that the drives are now ready for observing.
catch
statement whose clause
watches for the drives_enabled()
function becoming false
, or the arrival of
a suspended
signal.
The following is an example of an observing schedule that handles interruptions.
# Assign true to the following variable once the observations are completed. Boolean finished = false # Attempt to perform the observations at least once, repeating the attempt # if the telescope gets wind-stowed etc, before it has been finished. while(!$finished) { # Forget any previous reports of the schedule being suspended. signal/init suspended # Enable the computer drive-servos as soon as this is possible. enable_drives # Reset the receiver configuration. setup_rx # Stop observing if drive control is lost, or the schedule is suspended. catch !$drives_enabled() | $signaled(suspended) { ...perform the observations... finished = true } # Rate-limit the retry loop. until $elapsed > 0:0:1 }Beware that the observing part of the above script, inside the catch statement, will get newly executed after each interruption, unless it finishes before being interrupted again. It usually makes sense for this code to consult the local sidereal time, and or the elevation of the target sources, to make sure that what gets restarted makes sense. The observing code could also keep a record of what has been completed so far, so as not to redundantly re-observe sources that have already been observed.