Index

focus_drive_pars offset, scale, timeout, max_try, tolerance

Configure the servo parameters of one or more telescope axes.

Arguments:
Double offset
The zero offset of the focus resolver (mm).
Double scale
The scale factor of the resolver (mm/volt).
Double timeout
Abandon an attempt to set the focus position if it takes more than this time (hours).
Count max_try
Abandon an attempt to set the focus position if the focus positioner has to reverse direction more than this number of times.
Double tolerance
The initial default focusing tolerance in mm. Users can subsequently change this default by invoking the focus_tolerance command.

Example:
 focus_drive_pars 123.99, -46.78, 0:2:0, 4, 0.5
In the above example, the first two arguments tell the control system how to read the current focus position. Specifically it tells it that when the position resolver reads V volts, the focus position is (123.99-46.78*V) millimeters.

The 3rd argument tells the control system to give up trying to home in on a specified focus position if this takes more than 2 minutes, and the 4th arguments tells it to give up if it has to reverse direction and try again, more than 4 times.

The final argument tells the control system that when asked to go to a given focus position, it should only attempt to get within 0.5mm of that position.

Context:
Since the optimal focus position of the telescope varies as a function of telescope elevation, there is a mechanism for moving the receiving feeds along the bore-sight of the telescope. This consists of a motor that can be told to move the receiver towards or away from the telescope at a fixed speed, and a position resolver that outputs an analog voltage, proportional to the current position. The zero offset and scale of this resolver are configured by the first two arguments of the focus_drive_pars command, such that when the position resolver reads V volts, the position, in millimeters, is given by:
       focus position = offset + scale x V  

When asked to move the feed to a given focus position, the control system tells the motor to move the feed towards that position, until the position resolver indicates that the feed is within a specified precision of the desired position. However since the control system only reads the resolver once per servo update, the positioner can overshoot the desired position. When this happens, the control system reverses the direction of motion and tries again in the opposite direction.

If the requested positioning precision is too fine, or the desired position is beyond the limits that the positioner can reach, then the positioning operation needs to be timed out. The timeout and max_try arguments of the focus_drive_pars command determine when this happens. Specifically, if the positioner reverses direction more than max_try times, or takes more than timeout seconds to reach the desired position, then the operation is aborted.


Martin Shepherd (21-May-2010)