Class MecaStatusChecker

java.lang.Object
gda.factory.FindableBase
gda.device.robot.MecaStatusChecker
All Implemented Interfaces:
Findable

public class MecaStatusChecker extends FindableBase
Utility class to interpret Meca 'robot status' and 'gripper status' words to determine the current state. i.e. if moving or in error state etc. - see robotIsMoving(), waitForRobotMove(), checkErrorState(). This class is used in MecaRobotMover and MecaSampleHolderControl scannables
  • Constructor Details

    • MecaStatusChecker

      public MecaStatusChecker()
  • Method Details

    • waitForMove

      public void waitForMove() throws DeviceException
      Wait for getSleepTimeMs() then wait while the robot is moving (i.e. until end of movement and end of block bits are both true)
      Throws:
      DeviceException
    • waitForRobotMove

      public void waitForRobotMove() throws InterruptedException, DeviceException
      Throws:
      InterruptedException
      DeviceException
    • robotIsMoving

      public boolean robotIsMoving() throws DeviceException
      Determine if robot is currently busy moving by examining the robot status word.
      Returns:
      True if 'end of block' and 'end of movement' bits are both false
      Throws:
      DeviceException
    • checkErrorState

      public void checkErrorState() throws DeviceException
      Check error state of the robot and gripper
      Throws:
      DeviceException - if robot or gripper status bits contain error state
    • getRobotStatusBits

      public List<MecaRobotStatusBits> getRobotStatusBits() throws DeviceException
      Create list of MecaRobotStatusBits corresponding to each bit current set in the 'robot status' word.
      Returns:
      Throws:
      DeviceException
    • getRobotGripperStatusBits

      public List<MecaRobotGripperStatusBits> getRobotGripperStatusBits() throws DeviceException
      Create list of MecaRobotGripperStatusBits corresponding to each bit current set in the 'gripper status' word.
      Returns:
      Throws:
      DeviceException
    • getRobotStatus

      public Scannable getRobotStatus()
    • setRobotStatus

      public void setRobotStatus(Scannable robotStatus)
    • getGripperStatus

      public Scannable getGripperStatus()
    • setGripperStatus

      public void setGripperStatus(Scannable gripperStatus)
    • getSleepTimeMs

      public long getSleepTimeMs()
      Sleep time to use after setting a value in Epics to allow Epics record to be updated.
      Returns:
      time (milliseconds)
    • setSleepTimeMs

      public void setSleepTimeMs(long sleepTimeMs)
    • getPollTimeMs

      public long getPollTimeMs()
      Time interval to check robot status when waiting for robot move to finish.
      Returns:
      time (milliseconds)
    • setPollTimeMs

      public void setPollTimeMs(long pollTimeMs)