Package gda.device.robot
Class MecaStatusChecker
java.lang.Object
gda.factory.FindableBase
gda.device.robot.MecaStatusChecker
- All Implemented Interfaces:
Findable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck error state of the robot and gripperlongTime interval to check robot status when waiting for robot move to finish.Create list ofMecaRobotGripperStatusBitscorresponding to each bit current set in the 'gripper status' word.Create list ofMecaRobotStatusBitscorresponding to each bit current set in the 'robot status' word.longSleep time to use after setting a value in Epics to allow Epics record to be updated.booleanDetermine if robot is currently busy moving by examining the robot status word.voidsetGripperStatus(Scannable gripperStatus) voidsetPollTimeMs(long pollTimeMs) voidsetRobotStatus(Scannable robotStatus) voidsetSleepTimeMs(long sleepTimeMs) voidWait forgetSleepTimeMs()then wait while the robot is moving (i.e.voidMethods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
MecaStatusChecker
public MecaStatusChecker()
-
-
Method Details
-
waitForMove
Wait forgetSleepTimeMs()then wait while the robot is moving (i.e. until end of movement and end of block bits are both true)- Throws:
DeviceException
-
waitForRobotMove
- Throws:
InterruptedExceptionDeviceException
-
robotIsMoving
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
Check error state of the robot and gripper- Throws:
DeviceException- if robot or gripper status bits contain error state
-
getRobotStatusBits
Create list ofMecaRobotStatusBitscorresponding to each bit current set in the 'robot status' word.- Returns:
- Throws:
DeviceException
-
getRobotGripperStatusBits
Create list ofMecaRobotGripperStatusBitscorresponding to each bit current set in the 'gripper status' word.- Returns:
- Throws:
DeviceException
-
getRobotStatus
-
setRobotStatus
-
getGripperStatus
-
setGripperStatus
-
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)
-