AF2 Command Manual

Usage

Usage: af2 <command option> [command option parameters]

Examples:

af2 allcircle
af2 loadmodule
af2 setup m31.cfg

Comand Option Summary

Normal User Commands

-help,-?  displays help information
abort  - abort a setup
allcircle  - set all of the fibres to the circle position
allpark  - park all fibres
backillum <{on,off}>  - switch fibre back illumination on or off
check <configuration_file_name>  - check a configuration
disablefibre <fibre_number>  - disable a fibre
enablefibre <fibre_number>  - enable a fibre
eng  - switch to engineering user mode
extended  - switch to extended user mode
iterations <iterations> - set the number of fibre placement iterations
lights <{on,off}> - switch the inspection lights on or off
loadmodule - load the fibre module
map - perform a map on a configuration
movefibre <fibre_number x y> - move a fibre to x y position in microns
moveprobe <probe_position> - move the single axis probe
moverobot <x y> - move the robot
offsetfibre <fibre_number x y> - offset a fibre by x y in microns
offsetrobot <x y> - offset the robot
offsettel <skypa> <source> <fibre> - offset the telescope
park - park the robot
parkfibre <fibre_number> - park a fibre
ping - ping the robot control system
recover - recover a lost fibre
setup <configuration_file_name> - setup a configuration
sleep - sleep the robot
tolerance <tolerance> - set the fibre positioning tolerance in microns
viewfibre  <fibre_number> - view a fibre
viewobject <fibre_number> - view an object at a fibre
viewsky <x y> - view sky at the given position
wake - wake the robot
whichfibre - tell which fibre failed during a setup

Engineering Mode Commands

centroid - perform a centroid on a fibre and return its position
closegripper - close the gripper
extract - extract the robot from it's limit switches
initialise - initialise the robot
loadfibre <fibre_number> - load a fibre
loadfibrehere <fibre_number> - load a fibre here regardless of centroid failure
motors <{on,off}> - switch motor power on or off
normal - set to normal user mode
opengripper - open the gripper
power <{on,off}> - switch instrument power on or off
ringfibre <fibre_number> - ring a fibre
ringallfibres - ring all fibres

Extended Mode Commands

getaxisconfig < {x,y,z,theta,probe}> - get the axis configuration
killfibre <fibre_number> - kill a fibre
mc <command> - issue a command to the motion controller
reset - reset the robot control system
saveaxisconfig - save the robot's axis configuration permanently
setaxisconfig <{x,y,z,theta,probe}> - set the axis configuration
setgripperheight - set the gripper jaws lift and button heights
setprobeoffset - set the offset between gripper centre and sky viewing probe
tmove <theta_position> - move theta to the required angle in arcmins
zmove <z_position> - move the z axis
 


User Comand Details


abort

Function: abort a setup

The abort command causes the AF2 robot to complete the placement of the current fibre, and then stops the robot from placing any further fibres.

Example:
af2 abort


allcircle

Function: set all of the fibres to the circle position

The AF2 system commands the robot to place all the fibres in a circle of the smallest possible radius. Before attempting to move any fibres, the AF2 system checks whether any robot command is already in progress and takes appropriate action. The fibre back-illumination is switched on before any fibres are moved and switched off again on completion. The robot is also parked on successful completion.

Example:
af2 allcircle


allpark

Function: park all fibres

The AF2 system commands the robot to place all available fibres at their park positions. Before attempting to move any fibres, the AF2 system checks whether any robot command is already in progress and takes appropriate action. The fibre backillumination is switched on before any fibres are moved and switched off again on completion. The robot is also parked on successful completion.

Example:
af2 allpark


backillum <{on,off}>

Function: switch fibre back illumination on or off

The AF2 system commands the robot to turn the guide fibre back-illumination on or off. The AF2 system commands the WYFFOS system to turn the science fibre back-illumination on or off.

Example:
af2 backillum on
af2 backillum off



check <configuration_file_name>

Function: check a setup configuration

The AF2 system checks a user supplied setup configuration file without actually performing the setup. The AF2 system validates a field specified by the configuration file (.fld) generated using the af2 configure software. The observer passes the name of the configuration file, and the required sidereal time for the setup check. The AF2 system checks the file for inconsistencies, converts the object RA and DEC co-ordinates to fibre x and y coordinates, and checks for possible fibre collisions.
If the observers configuration file is found to be invalid, the system reports the reason it is invalid. This may be because the file is formatted incorrectly, or because the fibres would collide during the setup.

Example:
af2 check m31.cfg


disablefibre <fibre_number>

Function: disable a fibre

The given fibre number is marked as disabled. This temporarily disables the specified fibre so that it is not configured in future setups. The fibre will remain in its current position unless parked.

Example:
af2 disablefibre 58


enablefibre <fibre_number>

Function: enable a fibre

The temporarily disabled fibre is marked as enabled. This enables the specified fibre to be configured in future setups.

Example:
af2 enablefibre 58



eng

Function: switch to engineering user mode

The AF2 system prompts the engineer for a password, and on correct entry of the password, the engineer has access to the engineering commands. When engineering commands have been completed, the engineer performs the normal command to logout of engineering mode. Engineering commands are subsequently disabled.

Example:
af2 eng


extended

Function: switch to extended user mode

The AF2 system prompts the engineer for a password, and on correct entry of the password, the engineer has access to the extended commands. When extended commands have been completed, the engineer performs the normal command to logout of extended mode. Extended commands are subsequently disabled.

Example:
af2 extended


iterations <iterations>

Function: set the number of fibre placement iterations

Set the number of iterations to perform when placing fibres. The iteration count is the maximum number of times the AF2 robot places a fibre, measures its position and compares this position with the placement.

Example:
af2 iterations 2


lights <{on,off}>

Function: switch the inspection lights on or off

The AF2 system commands the robot to turn the AF2 inspection lights within the body of the instrument on or off.

Example:
af2 lights on


loadmodule

Function: load the fibre module

The AF2 system switches on the fibre back illumination systems and commands the robot to move to each fibre in sequence. The TV system measures the position of each fibre and the system updates its record of fibre positions. If a fibre is not found to be in its expected position, the system commands the robot to perform a spiral search around the last known position of the fibre, and when found, updates its record of the fibre position. If the fibre is not found during the spiral search, the load module fails, and the system reports the number of the fibre and the reason for failure. During the load module, no other commands that would move the robot are allowed.

Example:
af2 loadmodule


map

Function: perform a map on a configuration

Performs a distortion map of the Prime Focus field. This constructs a distortion map of the Prime Focus field using a standard set of star positions, and star centroid information produced by the autoguider. When the command is issued, the user will be prompted for the following information:

Which autoguider is on the sky viewing probe? e.g. ag4
Autoguider integration time
Enter the expected coordinates of the objects in the mobile probe (eg. 400 400)
Enter autoguider rotation in radians (the rotation with the 4ms autoguider was 0.071558499)

A mapping file named "ASTROM.AF2_DAT", containing the results of the map, is created in the current directory.

Example:
af2 map


movefibre <fibre_number x y>

Function: move a fibre to x y position in microns

This moves a given fibre, identified by its pivot number, from its current position to a new position. The position is given as an integer number of microns relative to the AF2 field centre. The fibre back-illumination is turned on before the placement and turned off afterwards.

Example:
af2 movefibre 58 0 0


moveprobe <probe_position>

Function: move the single axis probe

This moves the off-axis (fixed autoguider) probe to the given position, relative to the origin of the probe. Units of the movement are in microns.

Example:
af2 moveprobe 150000


moverobot <x y>

Function: move the robot

Move the robot from its current position to a new position. The position is given as an integer number of microns relative to the AF2 field centre.

Example:
af2 moverobot -100 100


offsetfibre <fibre_number x y>

Function: offset a fibre by x y in microns

This offsets a given fibre, identified by its pivot number, from its current position by an offset amount given as an integer number of microns relative to the fibre s current position. The fibre back-illumination is turned on before the placement and turned off afterwards.

Example:
af2 offsetfibre 58 10 10


offsetrobot <x y>

Function: offset the robot

This offsets the robot by an incremental amount of microns in x and y relative to its current position.

Example:
af2 offsetrobot -100 100


offsettel <skypa> <source> <fibre>

Function: offset the telescope

The AF2 system instructs the TCS to move the prime focus rotator to the specified sky position angle (in degrees) and prompts the observer to centre the specified object at the field centre before performing the offset. The AF2 system will then instruct the TCS to move the telescope to centre the object in the specified fibre and move the mobile probe to view the object above the fibre for acquisition. The source is the TCS User Catalogue name of the object used for the offset.

Example usage:
af2 offsettel 90 test 57
Setting TCS rotator sky to 90.0 degrees
Do you want to acquire the source first? (y/n) : n
Please centre the source in the mobile autoguider probe using the TCS handset
Are you ready to perform the offset? (y/n) : y
Offsetting telescope (arc) by 645.877431217142 -917.6677394273728
 
   The telescope has been offset to fibre 57
   Focal plane coordinates: X 645.877431217142 arcseconds
                            Y -917.6677394273728 arcseconds


Example:
af2 offsettel 90 star 57


park

Function: park the robot

This parks the robot carriage out of the field.

Example:
af2 park


parkfibre <fibre_number>

Function: park a fibre

This commands the robot to place the specified fibre in its park position.

Example:
af2 parkfibre 58


ping

Function: ping the robot control system

This command reports an error if the AF2 Robot Control system is unavailable

Example:
af2 ping


recover

Function: recover a lost fibre

This instructs the AF2 robot to recover the last fibre used if the gripper couldn't pick it up properly, or if the fibre was dropped during a move. The command causes AF2 to inspect the immediate area where the fibre was last known to be, and the area that it was to be placed. The fibre position is updated as soon as it is found. If a fibre can't be recovered, then the fibre module should be seperated from the robot, and a visual inspection be carried out.

Example:
af2 recover


reset

Function: reset the robot control system

Resets the robot control system. Note that any lost fibres will be marked to show their previous known position. Therefore, after using this command, the fibre positions should be updated using the loadmodule command

Example:
af2 reset


setup <configuration_file_name>

Function: setup a configuration

The observer passes the name of the configuration file, and the required sidereal time for the setup. The AF2 system checks the file for inconsistencies, converts the object RA and DEC co-ordinates to fibre x and y coordinates, and checks for possible fibre collisions. The AF2 system switches on the fibre back illumination systems and commands the robot to move fibres from their current positions to the calculated x and y object coordinates. The robot places the science and fiducial fibres to an accuracy specified by the tolerance command, by iteratively moving the fibre on the field plate and checking its position using its gripper TV system. The robot places fibres outside the observable field, fibres that are marked as sky viewing fibres, and fibres that are not associated with an object, to an accuracy of 100 microns. During the setup, no other commands that would move the robot are allowed.

When the command is issued, the user will be asked whether they want to accept the current sidereal time, or whether they want to enter their own.
e. g.
Do you want to use the current sidereal time: 2 31 52.798 (y/n) : n
Sidereal time : 4 0 0


Example:
af2 setup m31.cfg


sleep

Function: sleep the robot

The AF2 system moves the robot to its parked position, and switches off the instrument and motor power.

Example:
af2 sleep


tolerance <tolerance>

Function: set the fibre positioning tolerance in microns

The AF2 system sets the robot positioning tolerance in units of microns.

Example:
af2 tolerance


viewfibre <fibre_number> 

Function: view a fibre

The AF2 system moves the robot to the last known position of the fibre and the fibre is viewed on the gripper TV.

Example:
af2 viewfibre 58


viewobject <fibre_number>

Function: view an object at a fibre

The AF2 system moves the robot to the position of the object and the object is viewed on the AF2 mobile sky-viewing probe.

Example:
af2 viewobject 58


viewsky <x y>

Function: view sky at the given position

The AF2 system moves the robot to the requested position and the sky at this position is viewed on the AF2 mobile sky-viewing probe.

Example:
af2 viewsky 0 0


wake

Function: wake the robot

The AF2 system switches on the instrument and motor power, and moves the z, theta, and then x and y axes to their home positions. During the movement of the x and y axes, the gripper jaws are opened and closed 7 times. If the robot fails to find the home switches of any axes, then the system reports the name of the failed axis, and the reason for failure.

Example:
af2 wake


whichfibre

Function: tell which fibre failed during a setup

The AF2 system returns the number of the fibre that failed to be moved correctly.

Example:
af2 whichfibre



Engineering Mode Comand Details


centroid

Function: perform a centroid on a fibre and return its position

The AF2 system returns the x and y coordinates of the centroid of the fibre in view on the TV system.

Example:
af2 centroid


closegripper

Function: close the gripper

The AF2 system commands the robot to close the fibre gripper jaws.

Example:
af2 closegripper


extract

Function: extract the robot from it's limit switches

The AF2 system extracts the robot from its limit switches.

Example:
af2 extract


getaxisconfig < {x,y,z,theta,probe}>

Function: get the axis configuration

Gets the Acceleration, Deceleration,  Speed, Zero Switch Position. Minimum Position, and Maximum Position of the axis.

Example:
af2 getaxisconfig z


initialise

Function: initialise the robot

The AF2 system commands the robot to move the probe, z, theta, and then x and y axes to their home positions. During the movement of the x and y axes, the gripper jaws are opened and closed several times.

Example:
af2 initialise


killfibre <fibre_number>

Function: kill a fibre

The AF2 system permanently disables a fibre from being used for viewing or moving.

Example:
af2 killfibre 58


loadfibre <fibre_number>

Function: load a fibre

The AF2 TV system measures the position of the fibre and the system updates its record of fibre positions. If a fibre is not found to be in its expected position, the system commands the robot to perform a spiral search around the last known position of the fibre, and when found, updates its record of the fibre position. If the fibre is not found during the spiral search, the load fibre fails, and the system reports the number of the fibre and the reason for failure.

Example:
af2 loadfibre 58


loadfibrehere <fibre_number>

Function: load a fibre here regardless of centroid failure

Load the given fibre number at the robot's current position. This updates the fibres position to the current robot position without performing a TV centroid on the fibre.

Example:
af2 loadfibrehere 58


motors <{on,off}>

Function: switch motor power on or off

The AF2 system commands the robot to switch on or off the power to the robot motors.

Example:
af2 motors on


normal

Function: set to normal user mode

Sets the AF2 system to accept only normal user mode commands, disabling all engineering and extended mode commands.

Example:
af2 normal


opengripper

Function: open the gripper

The AF2 system commands the robot to open the fibre gripper jaws.

Example:
af2 opengripper


power <{on,off}>

Function: switch instrument power on or off

The AF2 system commands the robot to switch on or off the power to the instrument.

Example:
af2 power on


ringfibre <fibre_number>

Function: ring a fibre

The engineer manually places the specified fibre on the fibre module into the load ring position. The AF2 system updates the position of the fibre such that it can be found by the TV system in the load ring position.

Example:
af2 ringfibre 58


ringallfibres

Function: ring all fibres

The engineer manually places all of the fibres on the fibre module into the load ring position. The AF2 system updates the position of all of the fibres such that they can be found by the TV system in the load ring position.

Example:
af2 ringallfibres


setaxisconfig <{x,y,z,theta,probe}>

Function: set the axis configuration

Sets the Acceleration, Deceleration,  Speed, Zero Switch Position. Minimum Position, and Maximum Position of the axis. These changes will only take effect when the robot is next woken using the wake command. The changes will only be made permanent by issuing the saveaxisconfig command.

Example:
af2 setaxisconfig z



Extended Mode Comand Details


mc <command>

Function: issue a command to the motion controller

Issue a command directly to the AF2 motion controller, and return the result.

Example:
af2 mc TP


saveaxisconfig

Function: save the robot's axis configuration permanently

Saves the currently set axis configuration to the AF2 axis database. This permanently saves changes made to the axis configurations performed using the setaxisconfig , setgripperheight, and setprobeoffset commands.

Example:
af2 saveaxisconfig


setgripperheight

Function: set the gripper jaws lift and button heights

Sets the lifted and fibre button heights for the gripper. This may be neccessary if the fibre module is moved towards or away from the robot using spacers. These changes will only take effect when the robot is next woken using the wake command. The changes will only be made permanent by issuing the saveaxisconfig command.

Example:
af2 setgripperheight


setprobeoffset

Function: set the offset between gripper centre and sky viewing probe

This sets the offset, in x and y, between the gripper centre and mobile probe. This is to allow the engineer to modify the offset at the start of an AF2 run, to ease the finding of stars in the mobile probe. These changes will only take effect when the robot is next woken using the wake command. The changes will only be made permanent by issuing the saveaxisconfig command.

Example:
af2 setprobeoffset


tmove <theta_position>

Function: move theta to the required angle in arcmins

The AF2 system commands the robot to move the theta axis to a specified encoder value.

Example:
af2 tmove 0


zmove <z_position>

Function: move the z axis

The AF2 system commands the robot to move the z-axis (gripper jaws) to a specified encoder value.

Example:
af2 zmove 500





Last updated 28/10/2011 by rjp