Class Robot

java.lang.Object
  extended by Robot

 class Robot
extends java.lang.Object

The class Robot provides methods for initialising the AF2 robot's hardware and axes, moving the axis motors, and getting the status of the robot. It also provides methods for viewing and moving fibres.


Field Summary
private static Robot _instance
           
private  int AXIS_ERROR_LIMIT
           
private  int AXIS_ERROR_LIMIT_DISABLE
           
private  int AXIS_MAX_ALLOWED_ERROR
           
(package private) static MotionControllerAxis AXIS_P
           
(package private) static MotionControllerAxis AXIS_S
           
(package private) static MotionControllerAxis AXIS_T
           
(package private) static MotionControllerAxis AXIS_X
           
(package private) static MotionControllerAxis AXIS_Y
           
(package private) static MotionControllerAxis AXIS_Z
           
private  boolean ENCODER_SIMULATION
           
private  RobotError Error
           
private  int FIBRE_MAX_DRAG_DISTANCE
           
private  int FIBRE_MAX_OFFSET
           
private  int FIBRE_MAX_POS_ERROR
           
private  int FIBRE_PLACEMENT_ITERATIONS
           
private  int fibrePlacementIterations
           
private  int fibrePositioningTolerance
           
private  int GRIPPER_DELAY
           
private  int INPUT_PORT_AIR_PRESSURE_STATUS
           
private  int INPUT_PORT_FIBRE_MODULE_SWITCH_A
           
private  int INPUT_PORT_FIBRE_MODULE_SWITCH_B
           
private  int INPUT_PORT_GUIDE_FIBRE_BACK_ILLUM_STATUS
           
private  int INPUT_PORT_INSTRUMENT_POWER_STATUS
           
private  int INPUT_PORT_MOTOR_RELAY_STATUS
           
private  int INPUT_PORT_SCIENCE_FIBRE_BACK_ILLUM_STATUS
           
private  int INPUT_PORT_SERVO_AMPLIFIER_STATUS
           
private  int OUTPUT_PORT_GRIPPER_CONTROL
           
private  int OUTPUT_PORT_GUIDE_FIBRE_BACK_ILLUMINATION
           
private  int OUTPUT_PORT_INSPECTION_LIGHTS
           
private  int OUTPUT_PORT_INSTRUMENT_POWER
           
private  int OUTPUT_PORT_LIMIT_SWITCH_OVERRIDE
           
private  int OUTPUT_PORT_MOTOR_POWER
           
private  int P_ROBOT_SEPARATION
           
private  boolean SIMULATION
           
private  RobotAxisConfigurationP theAxisPConfiguration
           
private  RobotAxisConfigurationT theAxisTConfiguration
           
private  RobotAxisConfigurationX theAxisXConfiguration
           
private  RobotAxisConfigurationY theAxisYConfiguration
           
private  RobotAxisConfigurationZ theAxisZConfiguration
           
private  MotionController theMotionController
           
(package private)  RobotConfiguration theRobotConfiguration
           
private  RobotTemperature theRobotTemperature
           
private  RobotXYAxisStraightness theRobotXYAxisStraightness
           
private  SkyViewingProbe theSkyViewingProbe
           
private  double XY_NON_ORTHOGONALITY
          XY Axes non-orthogonality in radians
 
Constructor Summary
private Robot()
          Robot private constructor
 
Method Summary
(package private)  void closeGripper()
          Close the gripper
private  void defineAuxiliaryEncoderPosition(MotionControllerAxis theAxis, int encoderPosition)
          Define the auxiliary encoder position
private  void defineEncoderPosition(MotionControllerAxis theAxis, int encoderPosition)
          Define the encoder position
private  void dragFibre(Fibre theFibre, int xOffset, int yOffset)
          Drag the fibre on the field plate by an offset in x and y
(package private)  void extract()
          Extract the robot from its limit switches
(package private)  long getAcceleration(MotionControllerAxis theAxis)
          Get the axis acceleration
private  long getClosestThetaAngle(long deltaThetaInArcMins)
          Get the closer theta angle to a given rotation angle
private  long getClosestThetaDemandEncoderPosition(long demandThetaInArcMins)
          Get the closest theta demand position to an angle
(package private)  RobotConfiguration getConfiguration()
          Get the robot's configuration
private  java.awt.Point getFibrePosition(Fibre theFibre)
          Get the fibre's position in the true robot coordinates
(package private)  int getFibrePositioningIterations()
          Get the number of fibre positioning iterations
(package private)  int getFibrePositioningTolerance()
          Get the fibre positioning tolerance
(package private)  long getPEncoderPosition()
          Get the probe encoder position
(package private)  long getPPositionInMicrons()
          Get the probe position in microns
(package private)  java.awt.Point getSkyViewingProbePositionInMicrons()
          Get the robot's sky viewing probe position in microns, corrected for temperature expansion and non-orthogonality
(package private)  long getSpeed(MotionControllerAxis theAxis)
          Get the axis speed
(package private)  double getTemperature()
          Get the robot temperature
(package private)  long getTEncoderPosition()
          Get the theta encoder position
(package private)  long getTPositionInArcmins()
          Get the theta angle
(package private)  long getTPositionInArcmins(long tEncoderPosition)
          Get the theta angle
(package private)  long getXEncoderPosition()
          Get the y encoder position
(package private)  java.awt.Point getXYCorrectedPositionInMicrons()
          Get the robot's true position in microns, corrected for temperature expansion and non-orthogonality
private  java.awt.Point getXYCorrectedPositionInMicrons(java.awt.Point theXYEncoderPosition)
          Get the true xy position in microns, corrected for thermal expansion, axis straightness, and non-orthogonality
private  java.awt.Point getXYDistance(java.awt.Point point1, java.awt.Point point2)
          Get the distance in x and y between two points
(package private)  java.awt.Point getXYLinearEncoderPosition()
          Get the x-y position of the robot from its linear encoders
private  java.awt.Point getXYOthogonalityCorrectedPosition(java.awt.Point thePosition, double theNonOrthogonalityAngle)
          Get the othogonality corrected position of the XY axes
private  java.awt.Point getXYTemperatureCorrectedPosition(java.awt.Point thePosition, double theTemperature)
          Get the position of the XY axes compensated for temperature
(package private)  long getYEncoderPosition()
          Get the x encoder position
(package private)  long getZEncoderPosition()
          Get the x encoder position
private  boolean hasPositionError(MotionControllerAxis theAxis)
          Check whether an axis has a position error
private  void homeP()
          Find the home position of the off-axis probe axis
private  void homeT()
          Find the home position of the Theta axis
private  void homeXY()
          Find the home position of the XY axes
private  void homeZ()
          Find the home position of the Z axis
(package private)  void initialise()
          Initialise the robot
(package private)  void initialisePAxis()
          Initialise the Probe axis
(package private)  void initialiseTAxis()
          Initialise the Theta axis
(package private)  void initialiseXYAxis()
          Initialise the X-Y axes of the robot
(package private)  void initialiseZAxis()
          Initialise the Z axis
static Robot instance()
          The instance class method
(package private)  boolean isAirPressureOn()
          Is the air pressure power on
(package private)  boolean isGripperClosed()
          Is the gripper closed
(package private)  boolean isGripperLowered()
          Is the gripper lowered to the field plate
(package private)  boolean isGripperLowered(long zPosition)
          Is the gripper lowered to the field plate
(package private)  boolean isGuideFibreBackIlluminationOn()
          Is the guide fibre back illumination on
(package private)  boolean isInForwardLimit(MotionControllerAxis theAxis)
          Is the axis in its forward limit
(package private)  boolean isInReverseLimit(MotionControllerAxis theAxis)
          Is the axis in its reverse limit
(package private)  boolean isInspectionLightOn()
          Is the inspection light on
(package private)  boolean isInstrumentPowerOn()
          Is the insturment power on
(package private)  boolean isLargeFibreModuleSwitchOn()
          Is the large fibre module switch on
(package private)  boolean isMotorPowerOn()
          Is the motor power on
(package private)  boolean isScienceFibreBackIlluminationOn()
          Is the science fibre back illumination on
(package private)  boolean isServoAmplifierOn()
          Is the servo amplifier on
(package private)  boolean isSmallFibreModuleSwitchOn()
          Is the small fibre module switch on
private  void jog(MotionControllerAxis theAxis, long jogSpeed)
          Jog the axis
private  void liftGripper()
          Lift the gripper above the fibre buttons
(package private)  void loadFibre(Fibre theFibre, FibreModule theFibreModule)
          Update the true position of the fibre based on the centroid from the gripper camera system
(package private)  void loadModule(FibreModule theFibreModule)
          Load all of the fibres in the fibre module
(package private)  void loadModuleAll(FibreModule theFibreModule)
          Load all of the fibres in the fibre module continuing in the event of lost fibres
private  void lowerGripper()
          Lower the gripper to the height of the fibre button
(package private)  void moveFibre(Fibre theFibre, TargetFibre theTarget, FibreModule theFibreModule)
          Move a fibre from its current position to the target fibre's position
(package private)  void moveProbe(long positionInMicrons)
          Move the single axis probe
(package private)  void moveTheta(long positionInArcminutes)
          Move the theta axis
private  void moveToFibre(Fibre theFibre)
          Move the robot in X, Y and T, to a fibre
private  void moveToFibre(Fibre theFibre, java.awt.Point theOffsetFromFibre)
          Move the robot to a fibre, but offset the position by an X-Y offset
private  void moveXY(long x, long y)
          Move the robot to the specified x-y coordinates
(package private)  void moveXY(long x, long y, FibreModule theFibreModule)
          Move the robot to the requested X-Y position, moving theta to the angle of the nearest fibre
private  void moveXYT(long x, long y, long theta)
          Move the robot to the specified x-y-t coordinates
(package private)  void moveZ(long position)
          Move the z axis
private  void offset(MotionControllerAxis theAxis, int offset)
          Offset (position relative) an axis by a given amount
(package private)  void offsetFibre(Fibre theFibre, int xOffset, int yOffset, FibreModule theFibreModule)
          Offset a fibre
private  void offsetXY(long xoffset, long yoffset)
          Offset the XY axes in encoder units
(package private)  void offsetXYMicrons(long xoffset, long yoffset)
          Offset the XY axes in microns
(package private)  void openGripper()
          Open the gripper
(package private)  void park()
          Park the robot
(package private)  void parkFibre(Fibre theFibre, FibreModule theFibreModule)
          Park a fibre in the park ring
private  void pickUp()
          Lower the gripper to the fibre button, close the gripper, and lift the gripper
private  void putDown()
          Lower the gripper to the fibre button, open the gripper, and lift the gripper
private  void putDownFibre(Fibre theFibre, TargetFibre theTarget, FibreModule theFibreModule)
          Put a fibre down on the field plate at the target position, and load its new position
(package private)  void recoverFibre(Fibre theFibre, FibreModule theFibreModule)
          Recover a lost fibre by searching first in the expected position, and then in the fibre's previous known position
(package private)  void setAcceleration(MotionControllerAxis theAxis, int Acceleration)
          Set the axis acceleration
(package private)  void setBackIlluminationOff()
          Set the fibre back illumination off
(package private)  void setBackIlluminationOn()
          Set the fibre back illumination on
(package private)  void setDeceleration(MotionControllerAxis theAxis, int Deceleration)
          Set the axis deceleration
private  void setErrorLimit(long errorLimit)
          Set the error limit for all axes
(package private)  void setFibrePositioningIterations(int numberOfFibrePlacementIterations)
          Set the number of fibre placement iterations
(package private)  void setFibrePositioningTolerance(int fibrePositioningToleranceInMicrons)
          Set the fibre positioning tolerance in microns
(package private)  void setInspectionLightsOff()
          Set the inspection lights off
(package private)  void setInspectionLightsOn()
          Set the inspection lights on
(package private)  void setInstrumentPowerOff()
          Set the instrument power off
(package private)  void setInstrumentPowerOn()
          Set the instrument power on
(package private)  void setLimitSwitchOverrideOff()
          Override the limit switches
(package private)  void setLimitSwitchOverrideOn()
          Enable the limit switches
(package private)  void setMotorPowerOff()
          Set the motor power off
(package private)  void setMotorPowerOn()
          Set the motor power on
private  void setPID(MotionControllerAxis theAxis, double ProportionalConstant, double Integrator, double DerivativeConstant)
          Set the axis PID filter constants
private  void setPositionLimits(MotionControllerAxis theAxis, long ReversePositionLimit, long ForwardPositionLimit)
          Set the axis position limits
(package private)  void setSmoothing(MotionControllerAxis theAxis, double Smoothing)
          Set the axis smoothing
(package private)  void setSpeed(MotionControllerAxis theAxis, int Speed)
          Set the axis speed
(package private)  void sleep()
          Sleep the robot
(package private)  void stop()
          Stop motion on all axes
(package private)  void viewFibre(Fibre theFibre)
          Move the gripper camera over a fibre in order to view it
(package private)  void viewObject(Fibre theFibre)
          View an object at the position of a fibre or fiducial object
(package private)  void viewSky(long x, long y)
          Move the robot such that its sky viewing probe is at the required position
private  void wait(MotionControllerAxis theAxis)
          Wait for axis motion to complete
private  void waitP()
          Wait for Probe motion to complete
private  void waitT()
          Wait for Theta motion to complete
private  void waitXYT()
          Wait for XYT motion to complete
private  void waitZ()
          Wait for Z motion to complete
(package private)  void wake()
          Wake the robot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMULATION

private final boolean SIMULATION
See Also:
Constant Field Values

ENCODER_SIMULATION

private final boolean ENCODER_SIMULATION
See Also:
Constant Field Values

AXIS_X

static final MotionControllerAxis AXIS_X

AXIS_Y

static final MotionControllerAxis AXIS_Y

AXIS_Z

static final MotionControllerAxis AXIS_Z

AXIS_T

static final MotionControllerAxis AXIS_T

AXIS_P

static final MotionControllerAxis AXIS_P

AXIS_S

static final MotionControllerAxis AXIS_S

INPUT_PORT_INSTRUMENT_POWER_STATUS

private final int INPUT_PORT_INSTRUMENT_POWER_STATUS
See Also:
Constant Field Values

INPUT_PORT_AIR_PRESSURE_STATUS

private final int INPUT_PORT_AIR_PRESSURE_STATUS
See Also:
Constant Field Values

INPUT_PORT_MOTOR_RELAY_STATUS

private final int INPUT_PORT_MOTOR_RELAY_STATUS
See Also:
Constant Field Values

INPUT_PORT_FIBRE_MODULE_SWITCH_A

private final int INPUT_PORT_FIBRE_MODULE_SWITCH_A
See Also:
Constant Field Values

INPUT_PORT_FIBRE_MODULE_SWITCH_B

private final int INPUT_PORT_FIBRE_MODULE_SWITCH_B
See Also:
Constant Field Values

INPUT_PORT_SERVO_AMPLIFIER_STATUS

private final int INPUT_PORT_SERVO_AMPLIFIER_STATUS
See Also:
Constant Field Values

INPUT_PORT_SCIENCE_FIBRE_BACK_ILLUM_STATUS

private final int INPUT_PORT_SCIENCE_FIBRE_BACK_ILLUM_STATUS
See Also:
Constant Field Values

INPUT_PORT_GUIDE_FIBRE_BACK_ILLUM_STATUS

private final int INPUT_PORT_GUIDE_FIBRE_BACK_ILLUM_STATUS
See Also:
Constant Field Values

OUTPUT_PORT_INSTRUMENT_POWER

private final int OUTPUT_PORT_INSTRUMENT_POWER
See Also:
Constant Field Values

OUTPUT_PORT_MOTOR_POWER

private final int OUTPUT_PORT_MOTOR_POWER
See Also:
Constant Field Values

OUTPUT_PORT_GRIPPER_CONTROL

private final int OUTPUT_PORT_GRIPPER_CONTROL
See Also:
Constant Field Values

OUTPUT_PORT_INSPECTION_LIGHTS

private final int OUTPUT_PORT_INSPECTION_LIGHTS
See Also:
Constant Field Values

OUTPUT_PORT_LIMIT_SWITCH_OVERRIDE

private final int OUTPUT_PORT_LIMIT_SWITCH_OVERRIDE
See Also:
Constant Field Values

OUTPUT_PORT_GUIDE_FIBRE_BACK_ILLUMINATION

private final int OUTPUT_PORT_GUIDE_FIBRE_BACK_ILLUMINATION
See Also:
Constant Field Values

AXIS_ERROR_LIMIT

private final int AXIS_ERROR_LIMIT
See Also:
Constant Field Values

AXIS_ERROR_LIMIT_DISABLE

private final int AXIS_ERROR_LIMIT_DISABLE
See Also:
Constant Field Values

AXIS_MAX_ALLOWED_ERROR

private final int AXIS_MAX_ALLOWED_ERROR
See Also:
Constant Field Values

P_ROBOT_SEPARATION

private final int P_ROBOT_SEPARATION
See Also:
Constant Field Values

XY_NON_ORTHOGONALITY

private final double XY_NON_ORTHOGONALITY
XY Axes non-orthogonality in radians

See Also:
Constant Field Values

theRobotXYAxisStraightness

private RobotXYAxisStraightness theRobotXYAxisStraightness

GRIPPER_DELAY

private final int GRIPPER_DELAY
See Also:
Constant Field Values

FIBRE_MAX_DRAG_DISTANCE

private final int FIBRE_MAX_DRAG_DISTANCE
See Also:
Constant Field Values

FIBRE_MAX_OFFSET

private final int FIBRE_MAX_OFFSET
See Also:
Constant Field Values

FIBRE_MAX_POS_ERROR

private final int FIBRE_MAX_POS_ERROR
See Also:
Constant Field Values

FIBRE_PLACEMENT_ITERATIONS

private final int FIBRE_PLACEMENT_ITERATIONS
See Also:
Constant Field Values

_instance

private static Robot _instance

Error

private RobotError Error

theRobotTemperature

private RobotTemperature theRobotTemperature

theMotionController

private MotionController theMotionController

theRobotConfiguration

RobotConfiguration theRobotConfiguration

theAxisXConfiguration

private RobotAxisConfigurationX theAxisXConfiguration

theAxisYConfiguration

private RobotAxisConfigurationY theAxisYConfiguration

theAxisZConfiguration

private RobotAxisConfigurationZ theAxisZConfiguration

theAxisTConfiguration

private RobotAxisConfigurationT theAxisTConfiguration

theAxisPConfiguration

private RobotAxisConfigurationP theAxisPConfiguration

theSkyViewingProbe

private SkyViewingProbe theSkyViewingProbe

fibrePlacementIterations

private int fibrePlacementIterations

fibrePositioningTolerance

private int fibrePositioningTolerance
Constructor Detail

Robot

private Robot()
Robot private constructor

Method Detail

instance

public static Robot instance()
The instance class method

Returns:
The single instance of the class

initialise

void initialise()
Initialise the robot


initialiseXYAxis

void initialiseXYAxis()
Initialise the X-Y axes of the robot


initialiseZAxis

void initialiseZAxis()
Initialise the Z axis


initialiseTAxis

void initialiseTAxis()
Initialise the Theta axis


initialisePAxis

void initialisePAxis()
Initialise the Probe axis


loadModule

void loadModule(FibreModule theFibreModule)
          throws FibreNotFound
Load all of the fibres in the fibre module

Parameters:
theFibreModule - The fibre module
Throws:
FibreNotFound

loadModuleAll

void loadModuleAll(FibreModule theFibreModule)
Load all of the fibres in the fibre module continuing in the event of lost fibres

Parameters:
theFibreModule - The fibre module

loadFibre

void loadFibre(Fibre theFibre,
               FibreModule theFibreModule)
         throws FibreNotFound
Update the true position of the fibre based on the centroid from the gripper camera system

Parameters:
theFibre - The fibre to be loaded
theFibreModule - The fibre module
Throws:
FibreNotFound

viewFibre

void viewFibre(Fibre theFibre)
Move the gripper camera over a fibre in order to view it

Parameters:
theFibre - The fibre

moveFibre

void moveFibre(Fibre theFibre,
               TargetFibre theTarget,
               FibreModule theFibreModule)
Move a fibre from its current position to the target fibre's position

Parameters:
theFibre - The fibre to be moved
theTarget - The target fibre
theFibreModule - The fibre module

offsetFibre

void offsetFibre(Fibre theFibre,
                 int xOffset,
                 int yOffset,
                 FibreModule theFibreModule)
Offset a fibre

Parameters:
theFibre - The fibre
xOffset - The offset in x
yOffset - The offset in y
theFibreModule - the fibre module

parkFibre

void parkFibre(Fibre theFibre,
               FibreModule theFibreModule)
Park a fibre in the park ring

Parameters:
theFibre - The fibre
theFibreModule - The fibre module

recoverFibre

void recoverFibre(Fibre theFibre,
                  FibreModule theFibreModule)
Recover a lost fibre by searching first in the expected position, and then in the fibre's previous known position

Parameters:
theFibre - The fibre
theFibreModule - The fibre module

putDownFibre

private void putDownFibre(Fibre theFibre,
                          TargetFibre theTarget,
                          FibreModule theFibreModule)
Put a fibre down on the field plate at the target position, and load its new position

Parameters:
theFibre - The fibre
theTarget - The target
theFibreModule - The fibre module

viewObject

void viewObject(Fibre theFibre)
View an object at the position of a fibre or fiducial object

Parameters:
theFibre - The fibre associated with the object

viewSky

void viewSky(long x,
             long y)
Move the robot such that its sky viewing probe is at the required position

Parameters:
x - The x sky position in robot coordinates
y - The y sky position in robot coordinates

wake

void wake()
Wake the robot


sleep

void sleep()
Sleep the robot


park

void park()
Park the robot


extract

void extract()
Extract the robot from its limit switches


offsetXYMicrons

void offsetXYMicrons(long xoffset,
                     long yoffset)
Offset the XY axes in microns

Parameters:
xoffset - The offset in x in microns
yoffset - The offset in y in microns

moveXY

void moveXY(long x,
            long y,
            FibreModule theFibreModule)
Move the robot to the requested X-Y position, moving theta to the angle of the nearest fibre

Parameters:
x - Demanded x position
y - Demanded y position
theFibreModule - The fibre module

moveTheta

void moveTheta(long positionInArcminutes)
Move the theta axis

Parameters:
positionInArcminutes - The position in arcminutes

moveZ

void moveZ(long position)
Move the z axis

Parameters:
position - The position in encoder counts

moveProbe

void moveProbe(long positionInMicrons)
Move the single axis probe

Parameters:
positionInMicrons - The demand position in microns

openGripper

void openGripper()
Open the gripper


closeGripper

void closeGripper()
Close the gripper


getTemperature

double getTemperature()
Get the robot temperature

Returns:
The robot's temperature in degrees Celsius

getXYLinearEncoderPosition

java.awt.Point getXYLinearEncoderPosition()
Get the x-y position of the robot from its linear encoders

Returns:
The x-y position of the robot

getXYCorrectedPositionInMicrons

java.awt.Point getXYCorrectedPositionInMicrons()
Get the robot's true position in microns, corrected for temperature expansion and non-orthogonality

Returns:
The robot's true position in microns

getSkyViewingProbePositionInMicrons

java.awt.Point getSkyViewingProbePositionInMicrons()
Get the robot's sky viewing probe position in microns, corrected for temperature expansion and non-orthogonality

Returns:
The robot's sky viewing probe position in microns

getXEncoderPosition

long getXEncoderPosition()
Get the y encoder position

Returns:
the y encoder position in encoder counts

getYEncoderPosition

long getYEncoderPosition()
Get the x encoder position

Returns:
the x encoder position in encoder counts

getZEncoderPosition

long getZEncoderPosition()
Get the x encoder position

Returns:
the x encoder position in encoder counts

getTEncoderPosition

long getTEncoderPosition()
Get the theta encoder position

Returns:
the theta encoder position in encoder counts

getTPositionInArcmins

long getTPositionInArcmins()
Get the theta angle

Returns:
the theta angle in arcminutes

getTPositionInArcmins

long getTPositionInArcmins(long tEncoderPosition)
Get the theta angle

Parameters:
tEncoderPosition - The theta encoder position
Returns:
the theta angle in arcminutes

getPEncoderPosition

long getPEncoderPosition()
Get the probe encoder position

Returns:
the probe encoder position in encoder counts

getPPositionInMicrons

long getPPositionInMicrons()
Get the probe position in microns

Returns:
The probe position in microns

getSpeed

long getSpeed(MotionControllerAxis theAxis)
Get the axis speed

Parameters:
theAxis - The axis
Returns:
the axis speed

getAcceleration

long getAcceleration(MotionControllerAxis theAxis)
Get the axis acceleration

Parameters:
theAxis - The axis
Returns:
The axis acceleration

getFibrePositioningTolerance

int getFibrePositioningTolerance()
Get the fibre positioning tolerance

Returns:
the fibre positioning tolerance

getFibrePositioningIterations

int getFibrePositioningIterations()
Get the number of fibre positioning iterations

Returns:
The number of fibre positioning iterations

getConfiguration

RobotConfiguration getConfiguration()
Get the robot's configuration

Returns:
The robot's configuration

setInstrumentPowerOn

void setInstrumentPowerOn()
Set the instrument power on


setInstrumentPowerOff

void setInstrumentPowerOff()
Set the instrument power off


setMotorPowerOn

void setMotorPowerOn()
Set the motor power on


setMotorPowerOff

void setMotorPowerOff()
Set the motor power off


setInspectionLightsOn

void setInspectionLightsOn()
Set the inspection lights on


setInspectionLightsOff

void setInspectionLightsOff()
Set the inspection lights off


setLimitSwitchOverrideOn

void setLimitSwitchOverrideOn()
Enable the limit switches


setLimitSwitchOverrideOff

void setLimitSwitchOverrideOff()
Override the limit switches


setBackIlluminationOn

void setBackIlluminationOn()
Set the fibre back illumination on


setBackIlluminationOff

void setBackIlluminationOff()
Set the fibre back illumination off


setAcceleration

void setAcceleration(MotionControllerAxis theAxis,
                     int Acceleration)
Set the axis acceleration

Parameters:
theAxis - The axis
Acceleration - The acceleration

setDeceleration

void setDeceleration(MotionControllerAxis theAxis,
                     int Deceleration)
Set the axis deceleration

Parameters:
theAxis - The axis
Deceleration - The deceleration

setSmoothing

void setSmoothing(MotionControllerAxis theAxis,
                  double Smoothing)
Set the axis smoothing

Parameters:
theAxis - The axis
Smoothing - The smoothing

setSpeed

void setSpeed(MotionControllerAxis theAxis,
              int Speed)
Set the axis speed

Parameters:
theAxis - The axis
Speed - The speed

stop

void stop()
Stop motion on all axes


isInstrumentPowerOn

boolean isInstrumentPowerOn()
Is the insturment power on

Returns:
Boolean to indicate whether the instrument power is on

isAirPressureOn

boolean isAirPressureOn()
Is the air pressure power on

Returns:
Boolean to indicate whether the air pressure is on

isMotorPowerOn

boolean isMotorPowerOn()
Is the motor power on

Returns:
Boolean to indicate whether the motor power is on

isLargeFibreModuleSwitchOn

boolean isLargeFibreModuleSwitchOn()
Is the large fibre module switch on

Returns:
Boolean to indicate whether the large fibre module switch is on

isSmallFibreModuleSwitchOn

boolean isSmallFibreModuleSwitchOn()
Is the small fibre module switch on

Returns:
Boolean to indicate whether the small fibre module switch is on

isServoAmplifierOn

boolean isServoAmplifierOn()
Is the servo amplifier on

Returns:
Boolean to indicate whether the servo amplifier is on

isScienceFibreBackIlluminationOn

boolean isScienceFibreBackIlluminationOn()
Is the science fibre back illumination on

Returns:
Boolean to indicate whether the science fibre back illumination is on

isGuideFibreBackIlluminationOn

boolean isGuideFibreBackIlluminationOn()
Is the guide fibre back illumination on

Returns:
Boolean to indicate whether the guide fibre back illumination is on

isInspectionLightOn

boolean isInspectionLightOn()
Is the inspection light on

Returns:
Boolean to indicate whether the inspection light is on

isGripperClosed

boolean isGripperClosed()
Is the gripper closed

Returns:
Boolean to indicate whether the gripper is closed

isGripperLowered

boolean isGripperLowered()
Is the gripper lowered to the field plate

Returns:
Boolean to indicate whether the gripper is lowered to the field plate

isGripperLowered

boolean isGripperLowered(long zPosition)
Is the gripper lowered to the field plate

Parameters:
zPosition - The Z position
Returns:
Boolean to indicate whether the gripper is lowered to the field plate

isInReverseLimit

boolean isInReverseLimit(MotionControllerAxis theAxis)
Is the axis in its reverse limit

Parameters:
theAxis - The axis
Returns:
Boolean to indicate whether the axis is in its reverse limit

isInForwardLimit

boolean isInForwardLimit(MotionControllerAxis theAxis)
Is the axis in its forward limit

Parameters:
theAxis - The axis
Returns:
Boolean to indicate whether the axis is in its forward limit

setPositionLimits

private void setPositionLimits(MotionControllerAxis theAxis,
                               long ReversePositionLimit,
                               long ForwardPositionLimit)
Set the axis position limits

Parameters:
theAxis - The axis
ReversePositionLimit - The reverse position limit
ForwardPositionLimit - The forward position limit

setFibrePositioningIterations

void setFibrePositioningIterations(int numberOfFibrePlacementIterations)
Set the number of fibre placement iterations

Parameters:
numberOfFibrePlacementIterations - The number of fibre placement iterations

setFibrePositioningTolerance

void setFibrePositioningTolerance(int fibrePositioningToleranceInMicrons)
Set the fibre positioning tolerance in microns

Parameters:
fibrePositioningToleranceInMicrons - The fibre positioning tolerance in microns

dragFibre

private void dragFibre(Fibre theFibre,
                       int xOffset,
                       int yOffset)
Drag the fibre on the field plate by an offset in x and y

Parameters:
theFibre - The fibre to be dragged
xOffset - The distance in x that the fibre is to be dragged
yOffset - The distance in y that the fibre is to be dragged

getFibrePosition

private java.awt.Point getFibrePosition(Fibre theFibre)
Get the fibre's position in the true robot coordinates

Parameters:
theFibre - The fibre
Returns:
The positon of the fibre

getXYCorrectedPositionInMicrons

private java.awt.Point getXYCorrectedPositionInMicrons(java.awt.Point theXYEncoderPosition)
Get the true xy position in microns, corrected for thermal expansion, axis straightness, and non-orthogonality

Parameters:
theXYEncoderPosition - The encoder position of the xy axes
Returns:
The true position of the xy axes in microns

getXYTemperatureCorrectedPosition

private java.awt.Point getXYTemperatureCorrectedPosition(java.awt.Point thePosition,
                                                         double theTemperature)
Get the position of the XY axes compensated for temperature

Parameters:
thePosition - The robot's encoer position
theTemperature - The temperature
Returns:
The temperature corrected position of the robot

getXYOthogonalityCorrectedPosition

private java.awt.Point getXYOthogonalityCorrectedPosition(java.awt.Point thePosition,
                                                          double theNonOrthogonalityAngle)
Get the othogonality corrected position of the XY axes

Parameters:
thePosition - The position to be corrected
theNonOrthogonalityAngle - The non othogonality angle in radians
Returns:
The othogonality corrected position

getClosestThetaDemandEncoderPosition

private long getClosestThetaDemandEncoderPosition(long demandThetaInArcMins)
Get the closest theta demand position to an angle

Parameters:
demandThetaInArcMins - The demanded angle in armins
Returns:
The closest theta encoder position to the given angle

getClosestThetaAngle

private long getClosestThetaAngle(long deltaThetaInArcMins)
Get the closer theta angle to a given rotation angle

Parameters:
deltaThetaInArcMins - The rotation angle in arcmins
Returns:
The closest theta angle to the rotation angle in armins

getXYDistance

private java.awt.Point getXYDistance(java.awt.Point point1,
                                     java.awt.Point point2)
Get the distance in x and y between two points

Parameters:
point1 - The first point
point2 - The second point
Returns:
The x and y distance between the two points

defineEncoderPosition

private void defineEncoderPosition(MotionControllerAxis theAxis,
                                   int encoderPosition)
Define the encoder position

Parameters:
theAxis - The axis
encoderPosition - The encoder position to be defined

defineAuxiliaryEncoderPosition

private void defineAuxiliaryEncoderPosition(MotionControllerAxis theAxis,
                                            int encoderPosition)
Define the auxiliary encoder position

Parameters:
theAxis - The axis
encoderPosition - The auxiliary encoder position to be defined

offset

private void offset(MotionControllerAxis theAxis,
                    int offset)
Offset (position relative) an axis by a given amount

Parameters:
theAxis - The axis
offset - The offset

jog

private void jog(MotionControllerAxis theAxis,
                 long jogSpeed)
Jog the axis

Parameters:
theAxis - The axis
jogSpeed - The joggin speed

homeXY

private void homeXY()
Find the home position of the XY axes


homeZ

private void homeZ()
Find the home position of the Z axis


homeT

private void homeT()
Find the home position of the Theta axis


homeP

private void homeP()
Find the home position of the off-axis probe axis


waitXYT

private void waitXYT()
Wait for XYT motion to complete


waitZ

private void waitZ()
Wait for Z motion to complete


waitT

private void waitT()
Wait for Theta motion to complete


waitP

private void waitP()
Wait for Probe motion to complete


moveXY

private void moveXY(long x,
                    long y)
Move the robot to the specified x-y coordinates

Parameters:
x - Demanded x position
y - Demanded y position

moveXYT

private void moveXYT(long x,
                     long y,
                     long theta)
Move the robot to the specified x-y-t coordinates

Parameters:
x - Demanded x position
y - Demanded y position
theta - Demanded theta position

offsetXY

private void offsetXY(long xoffset,
                      long yoffset)
Offset the XY axes in encoder units

Parameters:
xoffset - The offset in x in encoder units
yoffset - The offset in y in encoder units

setPID

private void setPID(MotionControllerAxis theAxis,
                    double ProportionalConstant,
                    double Integrator,
                    double DerivativeConstant)
Set the axis PID filter constants

Parameters:
theAxis - The axis
ProportionalConstant - The proportional constant
Integrator - The integrator
DerivativeConstant - The derivative constant

setErrorLimit

private void setErrorLimit(long errorLimit)
Set the error limit for all axes

Parameters:
errorLimit - The error limit in encoder counts

hasPositionError

private boolean hasPositionError(MotionControllerAxis theAxis)
Check whether an axis has a position error

Parameters:
theAxis - The axis
Returns:
Boolean to indicate whether the axis has a position error

wait

private void wait(MotionControllerAxis theAxis)
Wait for axis motion to complete

Parameters:
theAxis - The axis

moveToFibre

private void moveToFibre(Fibre theFibre)
Move the robot in X, Y and T, to a fibre

Parameters:
theFibre - The fibre to be moved to

moveToFibre

private void moveToFibre(Fibre theFibre,
                         java.awt.Point theOffsetFromFibre)
Move the robot to a fibre, but offset the position by an X-Y offset

Parameters:
theFibre - The fibre to be moved to
theOffsetFromFibre - The offset from the fibre position

lowerGripper

private void lowerGripper()
Lower the gripper to the height of the fibre button


liftGripper

private void liftGripper()
Lift the gripper above the fibre buttons


pickUp

private void pickUp()
Lower the gripper to the fibre button, close the gripper, and lift the gripper


putDown

private void putDown()
Lower the gripper to the fibre button, open the gripper, and lift the gripper