public class AutoChangerTrucksModule extends MobileItemModule
| Modifier and Type | Field and Description |
|---|---|
protected NumericSensor |
handoffPositionSensor0 |
protected NumericSensor |
handoffPositionSensor1 |
protected NumericSensor |
onlinePositionSensor0 |
protected NumericSensor |
onlinePositionSensor1 |
protected NumericSensor |
standbyPositionSensor0 |
protected NumericSensor |
standbyPositionSensor1 |
protected boolean |
updatingState |
currentAction, FCSLOG, haltRequired, hasToWaitForEndOfAction, lock, motionCompleted, moving, stopRequired| Constructor and Description |
|---|
AutoChangerTrucksModule(String moduleName,
int aTickMillis,
int encoderRibbonMinValue,
int encoderRibbonMaxValue,
int minActualValue,
int maxActualValue,
int standbyPosition,
int handoffPosition,
int onlinePosition,
long timeoutForTrucksMotion,
NumericSensor handoffPositionSensor0,
NumericSensor handoffPositionSensor1,
NumericSensor onlinePositionSensor0,
NumericSensor onlinePositionSensor1,
NumericSensor standbyPositionSensor0,
NumericSensor standbyPositionSensor1) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay) |
org.lsst.ccs.framework.TreeWalkerDiag |
checkHardware()
This method is called by method checkHardware in AutoChangerModule during
INITIALIZATION phase.
|
void |
configureControllers() |
static void |
configureDigitalInputOfLinearRails(EPOSController ctl)
This configures the digital inputs of the EPOS controller to work with a
holding brake.
|
static void |
configureDigitalOutputOfLinearRails(EPOSController ctl)
Configuration of an EPOS controller to work with a holding brake.
|
StatusDataPublishedByAutoChangerTrucks |
createStatusDataPublishedByAutoChangerTrucks()
Creates an object to be published on the status bus.
|
int |
getCurrent() |
int |
getEncoderRibbonMaxValue() |
int |
getEncoderRibbonMinValue() |
int |
getHandoffPosition() |
NumericSensor |
getHandoffPositionSensor0() |
NumericSensor |
getHandoffPositionSensor1() |
EPOSController |
getLinearRailMasterController() |
EPOSController |
getLinearRailSlaveController() |
int |
getOnlinePosition() |
NumericSensor |
getOnlinePositionSensor0() |
NumericSensor |
getOnlinePositionSensor1() |
int |
getPosition() |
int |
getSpeed() |
int |
getStandbyPosition() |
NumericSensor |
getStandbyPositionSensor0() |
NumericSensor |
getStandbyPositionSensor1() |
StatusDataPublishedByAutoChangerTrucks |
getStatusData()
Build the class StatusDataPublishedByAutoChangerTrucks
|
long |
getTimeoutForTrucksMotion() |
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() |
void |
initModule() |
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoffPosition()
Returns the boolean field atHandoff.
|
boolean |
isAtOnlinePosition()
Returns the boolean field atOnline.
|
boolean |
isAtStandbyPosition()
Returns the boolean field atStandby.
|
boolean |
isHandoffSensorsInError() |
boolean |
isHardwareReady() |
boolean |
isHomingDone() |
boolean |
isInitialized() |
boolean |
isMasterControllerInFault() |
boolean |
isOnlineSensorsInError() |
boolean |
isSlaveControllerInFault() |
boolean |
isStandbySensorsInError() |
void |
moveToAbsoluteTargetPosition(int targetPosition)
Move the trucks to an absolute position given as argument.
|
void |
moveToRelativeTargetPosition(int relativePosition)
Move the trucks to a relative position given as argument.
|
void |
postAction(FcsEnumerations.MobileItemAction action) |
void |
processUpdate(Observable source,
org.lsst.ccs.framework.Module.ValueUpdate v)
What to do when the Modules we observe (the controllers) send new
values.
|
void |
publishData() |
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
int |
readPosition()
For the GUI and end users for test purpose.
|
void |
startAction(FcsEnumerations.MobileItemAction action) |
void |
tick() |
void |
updatePosition()
Updates the field position of the carrier in reading the CPU of the
controller.
|
void |
updateStateWithSensors() |
protected void |
updateStateWithSensors(String[] readHexaValues)
This methods updates the lockStatus from an array of hexaValues.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted() |
abort, abort, checkStarted, checkStopped, executeAction, getHaltRequired, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopgetComponentTree, getEnvironment, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, postStart, sendSignal, sendSignalWithTimeLimit, setEnvironment, setName, setNObserverThreads, setObservables, setTickMillis, startTicking, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchange, getCheckedValueFromConfiguration, getChildren, getComponentByName, getFullPath, getParent, getParentObject, injectResources, listChildren, notifyChange, notifyChangeWithoutPreliminaryChecks, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected NumericSensor handoffPositionSensor0
protected NumericSensor handoffPositionSensor1
protected NumericSensor onlinePositionSensor0
protected NumericSensor onlinePositionSensor1
protected NumericSensor standbyPositionSensor0
protected NumericSensor standbyPositionSensor1
protected volatile boolean updatingState
public AutoChangerTrucksModule(String moduleName, int aTickMillis, int encoderRibbonMinValue, int encoderRibbonMaxValue, int minActualValue, int maxActualValue, int standbyPosition, int handoffPosition, int onlinePosition, long timeoutForTrucksMotion, NumericSensor handoffPositionSensor0, NumericSensor handoffPositionSensor1, NumericSensor onlinePositionSensor0, NumericSensor onlinePositionSensor1, NumericSensor standbyPositionSensor0, NumericSensor standbyPositionSensor1)
@Command(type=QUERY,
level=1,
description="Return actual trucks position. Doesn\'t read again the position on the controller.")
public int getPosition()
@Command(type=QUERY,
level=1,
description="Return HANDOFF position.")
public int getHandoffPosition()
@Command(type=QUERY,
level=1,
description="Return STANDBY position.")
public int getStandbyPosition()
@Command(type=QUERY,
level=1,
description="Return ONLINE position.")
public int getOnlinePosition()
public int getEncoderRibbonMinValue()
public int getEncoderRibbonMaxValue()
@Command(type=QUERY,
level=1,
description="Return true if the master controller is in fault.")
public boolean isMasterControllerInFault()
@Command(type=QUERY,
level=1,
description="Return true if the slave controller is in fault.")
public boolean isSlaveControllerInFault()
public EPOSController getLinearRailMasterController()
public EPOSController getLinearRailSlaveController()
public NumericSensor getStandbyPositionSensor0()
public NumericSensor getHandoffPositionSensor0()
public NumericSensor getOnlinePositionSensor0()
public NumericSensor getStandbyPositionSensor1()
public NumericSensor getOnlinePositionSensor1()
public NumericSensor getHandoffPositionSensor1()
public int getCurrent()
public int getSpeed()
@Command(type=QUERY,
level=1,
description="Return false if the 2 redondant position sensors at Standby are equal.")
public boolean isStandbySensorsInError()
@Command(type=QUERY,
level=1,
description="Return false if the 2 redondant position sensors at Handoff are equal.")
public boolean isHandoffSensorsInError()
@Command(type=QUERY,
level=1,
description="Return false if the 2 redondant position sensors at Online are equal.")
public boolean isOnlineSensorsInError()
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 isAtHandoffPosition()
@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 isAtOnlinePosition()
@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 isAtStandbyPosition()
@Command(type=QUERY,
level=0,
description="Return true if the homing of the trucks has been done.")
public boolean isHomingDone()
public void initModule()
initModule in class MobileItemModulepublic void tick()
tick in class org.lsst.ccs.framework.Modulepublic org.lsst.ccs.framework.TreeWalkerDiag checkHardware()
throws org.lsst.ccs.HardwareException
checkHardware in interface org.lsst.ccs.framework.HardwareControllercheckHardware in class MobileItemModuleorg.lsst.ccs.HardwareException@Command(type=ACTION,
level=1,
description="Configure Autochanger trucks master and slave controllers.",
alias="initControllers")
public void configureControllers()
throws SDORequestException,
FcsHardwareException
public boolean isInitialized()
@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the Handoff position.",
alias="goToHandoff")
public void goToHandOff()
throws org.lsst.ccs.messaging.BadCommandException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the Online position.")
public void goToOnline()
throws org.lsst.ccs.messaging.BadCommandException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the Standby position.")
public void goToStandby()
throws org.lsst.ccs.messaging.BadCommandException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the absolute position given as argument.",
alias="mobeABSPos")
public void moveToAbsoluteTargetPosition(int targetPosition)
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException,
ShortResponseToSDORequestException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
FcsHardwareException
targetPosition - org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionShortResponseToSDORequestExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Move Autochanger trucks to the relative position given as argument.",
alias="moveRELPos")
public void moveToRelativeTargetPosition(int relativePosition)
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException,
ShortResponseToSDORequestException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
FcsHardwareException
relativePosition - org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionShortResponseToSDORequestExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic void startAction(FcsEnumerations.MobileItemAction action) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
startAction in class MobileItemModuleorg.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
abortAction in class MobileItemModuleorg.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
quickStopAction in class MobileItemModuleorg.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareExceptionpublic void postAction(FcsEnumerations.MobileItemAction action) throws org.lsst.ccs.messaging.BadCommandException, org.lsst.ccs.messaging.ErrorInCommandExecutionException, FcsHardwareException
postAction in class MobileItemModuleorg.lsst.ccs.messaging.BadCommandExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Read actual position and do the homing of the master controllerwith this actual position.")
public void homing()
throws SDORequestException,
org.lsst.ccs.messaging.ErrorInCommandExecutionException,
ShortResponseToSDORequestException,
org.lsst.ccs.messaging.BadCommandException,
FcsHardwareException
SDORequestExceptionorg.lsst.ccs.messaging.ErrorInCommandExecutionExceptionShortResponseToSDORequestExceptionorg.lsst.ccs.messaging.BadCommandExceptionFcsHardwareException@Command(type=QUERY,
level=1,
description="Update trucks position in reading controller.")
public void updatePosition()
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionFcsHardwareException@Command(type=QUERY,
level=1,
description="Update trucks position in reading controller and return position.")
public int readPosition()
throws org.lsst.ccs.messaging.BadCommandException,
SDORequestException,
FcsHardwareException
org.lsst.ccs.messaging.BadCommandExceptionSDORequestExceptionFcsHardwareExceptionpublic boolean isHardwareReady()
isHardwareReady in class MobileItemModulepublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemModulepublic void updateStateWithSensorsToCheckIfActionIsCompleted()
throws Exception
updateStateWithSensorsToCheckIfActionIsCompleted in class MobileItemModuleException@Command(type=ACTION,
level=1,
description="Update Trucks state in reading sensors.")
public void updateStateWithSensors()
throws FcsHardwareException
FcsHardwareExceptionprotected void updateStateWithSensors(String[] readHexaValues) throws FcsHardwareException
readHexaValues - FcsHardwareException@Command(type=ACTION,
level=1,
description="To configure the autochanger linear rails controllers.")
public static void configureDigitalInputOfLinearRails(EPOSController ctl)
throws SDORequestException,
FcsHardwareException
@Command(type=ACTION,
level=1,
description="To configure the autochanger linear rails controllers.")
public static void configureDigitalOutputOfLinearRails(EPOSController ctl)
throws SDORequestException,
FcsHardwareException
ctl - controllerSDORequestExceptionFcsHardwareExceptionpublic StatusDataPublishedByAutoChangerTrucks getStatusData()
public StatusDataPublishedByAutoChangerTrucks createStatusDataPublishedByAutoChangerTrucks()
public void publishData()
publishData in class MobileItemModulepublic void processUpdate(Observable source, org.lsst.ccs.framework.Module.ValueUpdate v)
processUpdate in class org.lsst.ccs.framework.Modulesource - v - Copyright © 2016 LSST. All rights reserved.