public class AutochangerTwoTrucks extends MobileItem implements org.lsst.ccs.framework.ClearAlertHandler
agentStateService, commandDuration, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, scheduleralertSeparator| Constructor and Description |
|---|
AutochangerTwoTrucks(AutochangerTruck truckXminus,
AutochangerTruck truckXplus,
EPOSControllerForLinearRail linearRailMasterController,
EPOSControllerForLinearRail linearRailSlaveController)
Build a new AutoChangerTrucksModule.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
activateBrakesAndDisable()
activate both brakes then disableOperation on the 2 controllers.
|
void |
alignSlave()
move slave truk to masterPosition.
|
void |
alignSlaveAndMoveEmptyFromApproachToHandoff() |
org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode |
canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState) |
void |
checkConditionsForTrucksMotion()
This method sends Exceptions if the conditions for trucks motion are not
filled.
|
void |
checkDeltaPosition() |
void |
checkPositionSensors()
This method is called at the end of actions to check that after a motion
to well known position as STANDBY, HANDOFF and ONLINE, position sensors
confirm the trucks position.
|
void |
configureControllers()
Configure Autochanger trucks master and slave controllers.
|
StatusDataPublishedByAutoChangerTrucks |
createStatusDataPublishedByAutoChangerTrucks()
Creates an object to be published on the status bus.
|
void |
enableControllersAndReleaseBrake()
This method is used in the startAction method.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
end current action.
|
void |
fastProfile()
change speed and acceleration profile to fast
|
int |
getApproachStandbyPosition() |
int |
getHandoffPosition()
Return HANDOFF masterPosition.
|
int |
getOnlinePosition()
Return ONLINE position.
|
int |
getPosition()
Return actual trucks masterPosition.
|
int |
getStandbyPosition()
Return STANDBY masterPosition.
|
long |
getTimeoutForTrucksMotion()
Return the timeout for trucks motion.
|
void |
goToHandOff()
Move Autochanger trucks to the Handoff position.
|
void |
goToOnline()
Move Autochanger trucks to the Online position.
|
void |
goToStandby()
Move Autochanger trucks to the Standby position.
|
void |
homing()
Do homing of both controllers.
|
void |
initializeControllers() |
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoff()
Returns the boolean field atHandoff.
|
boolean |
isAtOnline()
Returns the boolean field atOnline.
|
boolean |
isAtStandby()
Returns the boolean field atStandby.
|
boolean |
isHomingDone()
Return true if the homing of the trucks has been done.
|
boolean |
isInitialized()
Return true if both controllers are initialized and homing of trucks are
done.
|
boolean |
isPositionSensorErrorsTransient()
At the end of a motion during tests, a bad positionning of the trucks in
a way that both sensors send the same value can be detected as an error.
|
boolean |
isPositionSensorsInError()
Return true if TruckXminus position sensors or TruckXminus position
sensors are in error.
|
void |
moveAndClampFilterOnline() |
void |
moveAndClampFilterOnlineNoBreak()
very dangerous : in case of an Exception : no break is activated.
|
void |
moveFilterToStandby()
Move a filter to standby position step by step.
|
void |
moveToAbsoluteTargetPosition(int targetPosition)
Move the trucks to an absolute position given as argument.
|
void |
moveToAbsoluteTargetPositionDangerous(int targetPosition)
Move the trucks to an absolute position given as argument.
|
void |
moveToApproachOnlinePositionWithHighVelocity() |
void |
moveToApproachOnlinePositionWithLowVelocity() |
void |
moveToApproachStandbyPositionWithHighVelocity() |
void |
moveToApproachStandbyPositionWithLowVelocity() |
void |
moveToHandoffWithHighVelocity() |
void |
moveToStandbyWithLowVelocity() |
void |
moveTruckXminus(int newPos)
move truckXminus (slave controller) independently of truckXplus (master
controller)
|
boolean |
myDevicesReady()
Return True if all CAN open devices useful for this MobileItemMobile are
ready for an action.
|
void |
postStart() |
void |
publishData() |
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
raiseProfileAcceleration()
change ProfileVelocity parameter to highSpeed
|
void |
raiseProfileDeceleration()
change ProfileVelocity parameter to highSpeed
|
void |
raiseProfileVelocity()
change ProfileVelocity parameter to highSpeed
|
int |
readPosition()
For the GUI and end users for test purpose.
|
double |
readProximitySensorDevice() |
void |
setNaturalPosition(int pos) |
void |
shutdown()
This shutdowns the scheduler.
|
void |
slowProfile()
change speed & acceleration profile to slow
|
void |
slowProfileAcceleration()
change ProfileAcceleration parameter to lowAcceleration
|
void |
slowProfileDeceleration()
change ProfileAcceleration parameter to lowAcceleration
|
void |
slowProfileVelocity()
change ProfileVelocity parameter to lowSpeed
|
void |
startAction(FcsEnumerations.MobileItemAction action)
starts the action given as argument.
|
void |
updatePosition()
Updates the field position of the trucks in reading the CPU of the
controller.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted()
reads sensors or any device and updates state from sensors
It can be also reading a position or a current on a motor controller.
|
cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearAlarm, getAlertSeparator, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarningpublic AutochangerTwoTrucks(AutochangerTruck truckXminus, AutochangerTruck truckXplus, EPOSControllerForLinearRail linearRailMasterController, EPOSControllerForLinearRail linearRailSlaveController)
truckXminus - truckXplus - linearRailMasterController - linearRailSlaveController - @ConfigurationParameterChanger public void setNaturalPosition(int pos)
@Command(type=QUERY,
level=1,
description="Return actual trucks position (master position). Doesn\'t read again the position on the controller.")
public int getPosition()
@Command(type=QUERY,
level=1,
description="Return HANDOFF position. Doesn\'t read again the position on the controller.")
public int getHandoffPosition()
@Command(type=QUERY,
level=1,
description="Return STANDBY position. Doesn\'t read again the position on the controller.")
public int getStandbyPosition()
@Command(type=QUERY,
level=1,
description="Return ONLINE position. Doesn\'t read again the position on the controller.")
public int getOnlinePosition()
public int getApproachStandbyPosition()
@Command(type=QUERY,
level=1,
description="Return timeout for trucks motion.")
public long getTimeoutForTrucksMotion()
@Command(type=QUERY,
level=0,
description="Return true if the carrier is at handoff position. This command doesn\'t read again the sensors.")
public boolean isAtHandoff()
@Command(type=QUERY,
level=0,
description="Return true if the carrier is at ONLINE position. This command doesn\'t read again the sensors.")
public boolean isAtOnline()
@Command(type=QUERY,
level=0,
description="Return true if the carrier is at STANDBY position. This command doesn\'t read again the sensors.")
public boolean isAtStandby()
@Command(type=QUERY,
level=0,
description="Return true if the homing of the trucks has been done.")
public boolean isHomingDone()
@Command(type=QUERY,
level=0,
description="Return true if TruckXminus position sensors or TruckXminus position sensors are in error.")
public boolean isPositionSensorsInError()
public boolean isPositionSensorErrorsTransient()
public void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecyclepublic void initializeControllers()
@Command(type=ACTION,
level=1,
description="Configure Autochanger trucks master and slave controllers.",
alias="initControllers")
public void configureControllers()
FcsHardwareException@Command(type=QUERY,
level=0,
description="Return true if both controllers are initialized and homing of trucks are done.")
public boolean isInitialized()
@Command(type=QUERY,
level=1,
description="Check if the motion of trucks are allowed.")
public void checkConditionsForTrucksMotion()
@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the Handoff position.",
alias="goToHandoff")
public void goToHandOff()
@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the Online position.")
public void goToOnline()
FcsHardwareException@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the Standby position.")
public void goToStandby()
@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the absolute position given as argument. At the end of motion : doesn\'t align slave then activate brakes and disable controllers.",
alias="mobeABSPos",
timeout=20000)
public void moveToAbsoluteTargetPosition(int targetPosition)
targetPosition - RejectedCommandExceptionFcsHardwareException@Command(type=ACTION,
level=3,
description="Move Autochanger trucks to the absolute position given as argument. At the end of motion : doesn\'t align slave then activate brakes and disable controllers VERY DANGEROUS COMMAND. Only for tests with prototype.",
timeout=20000)
public void moveToAbsoluteTargetPositionDangerous(int targetPosition)
targetPosition - RejectedCommandExceptionFcsHardwareException@Command(type=ACTION,
level=2,
description="goToOnline with filter then adjust position then close and finally lock clamps",
autoAck=false,
timeout=20000)
public void moveAndClampFilterOnline()
@Command(type=ACTION,
level=2,
description="move filter to approachPosition with high speed and move to STANDBY with lowSpeed.",
autoAck=false,
timeout=30000)
public void moveFilterToStandby()
@Command(type=ACTION) public void moveToApproachStandbyPositionWithLowVelocity()
@Command(type=ACTION) public void moveToApproachOnlinePositionWithLowVelocity()
@Command(type=ACTION) public void alignSlaveAndMoveEmptyFromApproachToHandoff()
@Command(type=ACTION) public void moveToApproachStandbyPositionWithHighVelocity()
@Command(type=ACTION) public void moveToApproachOnlinePositionWithHighVelocity()
@Command(type=ACTION) public void moveToStandbyWithLowVelocity()
@Command(type=ACTION) public void moveToHandoffWithHighVelocity()
public void moveAndClampFilterOnlineNoBreak()
@Command(type=ACTION,
level=1,
description="Activate brakes and disable the 2 controllers.")
public void activateBrakesAndDisable()
public void startAction(FcsEnumerations.MobileItemAction action)
MobileItemstartAction in class MobileItempublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemabortAction in class MobileItempublic void endAction(FcsEnumerations.MobileItemAction action)
MobileItemendAction in class MobileItempublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItem@Command(type=ACTION,
level=1,
description="Enable and release brake for the 2 controllers.")
public void enableControllersAndReleaseBrake()
@Command(type=ACTION,
level=1,
description="Align slave controller position to master controller position.",
timeout=20000)
public void alignSlave()
@Command(type=QUERY,
level=3,
description="Move truckXminus (slave controller) independently of truckXplus (master controller). To be used with final products AC1 and AC2.Don\'t use with prototype.")
public void moveTruckXminus(int newPos)
newPos - public void checkPositionSensors()
FcsHardwareException@Command(type=ACTION,
level=1,
description="Do homing for both controllers.")
public void homing()
@Command(type=QUERY,
level=1,
description="Update trucks position in reading controller.")
public void updatePosition()
FcsHardwareException@Command(type=QUERY,
level=1,
description="Read position on controllers then compute difference and throw exceptionif difference is > 1000.")
public void checkDeltaPosition()
@Command(type=QUERY,
level=0,
description="Update trucks position in reading controller and return position.")
public int readPosition()
RejectedCommandExceptionFcsHardwareException@Command(type=QUERY,
level=0,
description="Return a voltage in mV which represents a distance between between filterand filter beam.")
public double readProximitySensorDevice()
public boolean myDevicesReady()
MobileItemmyDevicesReady in class MobileItempublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItem@Command(type=ACTION,
level=1,
description="change ProfileVelocity parameter to lowSpeed and slowProfileAcceleration and slowProfileDeceleration")
public void slowProfile()
@Command(type=ACTION,
level=1,
description="change ProfileVelocity and ProfileAcceleration and ProfileDeceleration parameters to highSpeed")
public void fastProfile()
@Command(type=ACTION,
level=1,
description="change ProfileVelocity parameter to lowSpeed and slowProfileAcceleration and slowProfileDeceleration")
public void slowProfileVelocity()
@Command(type=ACTION,
level=1,
description="change ProfileVelocity and ProfileAcceleration and ProfileDeceleration parameters to highSpeed")
public void raiseProfileVelocity()
@Command(type=ACTION,
level=1,
description="change ProfileAcceleration parameter to highAcceleration")
public void raiseProfileAcceleration()
@Command(type=ACTION,
level=1,
description="change ProfileAcceleration parameter to lowAcceleration")
public void slowProfileAcceleration()
@Command(type=ACTION,
level=1,
description="change ProfileAcceleration parameter to highAcceleration")
public void raiseProfileDeceleration()
@Command(type=ACTION,
level=1,
description="change ProfileAcceleration parameter to lowAcceleration")
public void slowProfileDeceleration()
public org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState)
canClearAlert in interface org.lsst.ccs.framework.ClearAlertHandlerpublic StatusDataPublishedByAutoChangerTrucks createStatusDataPublishedByAutoChangerTrucks()
public void publishData()
publishData in class MobileItempublic void shutdown()
MobileItemshutdown in interface org.lsst.ccs.framework.HasLifecycleshutdown in class MobileItemCopyright © 2019 LSST. All rights reserved.