public class AutochangerOnlineClampModule extends MobileItemModule implements MovedByEPOSController
| Modifier and Type | Field and Description |
|---|---|
protected Condition |
currentRampEnded |
protected boolean |
hasToWaitForEndOfCurrentRamp |
protected boolean |
updatingState |
currentAction, FCSLOG, haltRequired, hasToWaitForEndOfAction, lock, motionCompleted, moving, scheduler, stopRequired| Constructor and Description |
|---|
AutochangerOnlineClampModule(EPOSController controller,
NumericSensor closeSensor,
NumericSensor closeSensorC,
NumericSensor openSensor,
NumericSensor openSensorC,
int currentToClose)
Build an AutochangerOnlineClampModule with a controller, 4 sensors and
2 maps of parameters for the controller.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
What to do to abort an action.
|
void |
checkConditionsForClosing()
Check if it's safe to close the clamp.
|
void |
checkConditionsForOpening()
Check if it's safe to open the clamp.
|
void |
checkControllerBeforeAction()
Read parameters for mode CURRENT on controller CPU.
|
org.lsst.ccs.framework.TreeWalkerDiag |
checkHardware()
This method is called during INITIALIZATION phase.
|
void |
close()
Close the ONLINE clamp.
|
void |
configureController()
Configure ONLINE clamp controller.
|
void |
configureDigitalInputOfOnlineClamps()
This method is used to configure the controllers of the autochanger
online clamps.
|
void |
configureDigitalOutputOfOnlineClamps()
This methods is used to configure the autochanger onlineClamps EPOS
controllers.
|
StatusDataPublishedByAutochangerOnlineClamp |
createStatusDataPublishedByOnlineClamp()
Creates and returns the object to be published on the STATUS bus.
|
void |
executeCurrentRamp(int initialValue,
int finalValue,
int nbStep,
long period)
Writes newCurrentValue to controller with a newCurrentValue ramp : from initialValue to finalValue in nbStep.
|
EPOSController |
getController()
Return ONLINE clamp controller
|
String |
getControllerName()
return controller name
|
int |
getCurrentToClamp()
For simulator
|
int |
getCurrentToClose()
For simulator
|
int |
getCurrentToOpen()
For simulator
|
long |
getTravelTime()
For simulator
|
void |
initModule()
Initialize fields autochanger, lockStatus and listens to its controller.
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isCANDevicesReady()
Return true when ONLINE clamp hardware is ready.
|
boolean |
isClosed()
Returns true if LockStatus=CLOSED.
|
boolean |
isCloseSensorsInError()
Returns true if closeSensor and closeSensorC return the same value.
|
boolean |
isControllerInFault()
Returns true if controller is in fault.
|
boolean |
isInError()
Returns true if LockStatus=ERROR, this means closeSensor or openSensor is in ERROR
or openSensor and closeSensor return non consistant values.
|
boolean |
isInitialized()
Returns true if clamp is initialized : hardware is ready (at least booted) and
clamp controller is initialized (parameters in the controller CPU have been checked and
controller has been configured.
|
boolean |
isInTravel()
Returns true if LockStatus=INTRAVEL.
|
boolean |
isOpened()
Returns true if LockStatus=OPENED.
|
boolean |
isOpenSensorsInError()
Returns true if openSensor and openSensorC retun the same value.
|
void |
open()
Open the ONLINE clamp.
|
void |
postAction(FcsEnumerations.MobileItemAction action)
What to be done after the action is completed.
|
void |
processUpdate(Observable source,
org.lsst.ccs.framework.Module.ValueUpdate v)
What to do when the Modules we observe send there new values.
|
void |
publishData() |
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
sendCurrentToController(int cur)
enables controller and sends current to controller
first applies a force on the clamp, and then releaseBrake
don't do it in the reverse order !!!!
|
void |
setControllerInFault(boolean controllerInFault)
set controllerInFault
|
void |
startAction(FcsEnumerations.MobileItemAction action)
Start action of locking or unlocking.
|
void |
updateStateWithSensors(String[] hexaValues)
This methods updates lockStatus from the values return by the sensors.
|
void |
updateStateWithSensorsToCheckIfActionIsCompleted() |
abort, abort, checkStarted, checkStopped, executeAction, getHaltRequired, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopgetNObserverThreads, getObservables, getTickMillis, init, listens, sendSignal, sendSignalWithTimeLimit, setNObserverThreads, setObservables, setTickMillis, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessEmergencyMessage, processFaultResetgetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemraiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarningchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, start, submitChange, submitChanges, validateBulkChangeprotected volatile boolean updatingState
protected final Condition currentRampEnded
protected boolean hasToWaitForEndOfCurrentRamp
public AutochangerOnlineClampModule(EPOSController controller, NumericSensor closeSensor, NumericSensor closeSensorC, NumericSensor openSensor, NumericSensor openSensorC, int currentToClose)
controller - closeSensor - closeSensorC - openSensor - openSensorC - currentToClose - public EPOSController getController()
public int getCurrentToClose()
public int getCurrentToOpen()
public int getCurrentToClamp()
public long getTravelTime()
@Command(type=QUERY,
level=1,
description="Returns true if lockSensor and lockSensorC retun the same value. Doesn\'t read again sensors.")
public boolean isCloseSensorsInError()
@Command(type=QUERY,
level=1,
description="Returns true if unlockSensor and unlockSensorC retun the same value. Doesn\'t read again sensors.")
public boolean isOpenSensorsInError()
@Command(type=QUERY,
level=1,
description="Returns true if LockStatus=ERROR, this means that closeSensor or openSensor is in ERROR or thatopenSensor and closeSensor return non consistant values. Doesn\'t read again sensors.")
public boolean isInError()
@Command(type=QUERY,
level=1,
description="Returns true if LockStatus=CLOSED. Doesn\'t read again sensors.")
public boolean isClosed()
@Command(type=QUERY,
level=1,
description="Returns true if LockStatus=OPENED. Doesn\'t read again sensors.")
public boolean isOpened()
@Command(type=QUERY,
level=1,
description="Returns true if LockStatus=INTRAVEL. Doesn\'t read again sensors.")
public boolean isInTravel()
@Command(type=QUERY,
level=1,
description="Returns true if controller is in fault. Doesn\'t read controller CPU.")
public boolean isControllerInFault()
isControllerInFault in interface MovedByEPOSControllerpublic void setControllerInFault(boolean controllerInFault)
setControllerInFault in interface MovedByEPOSControllercontrollerInFault - @Command(type=QUERY,
level=1,
description="Returns controller name.")
public String getControllerName()
getControllerName in interface MovedByEPOSController@Command(type=QUERY,
level=1,
description="Returns true if clamp is initialized : controller is booted, parameters in the controller CPU have been checked and controller is configured.")
public boolean isInitialized()
public void initModule()
initModule in class MobileItemModule@Command(type=QUERY,
level=1,
description="Returns true if controller is initialized and configured.")
public boolean isCANDevicesReady()
isCANDevicesReady in class MobileItemModule@Command(type=QUERY,
level=1,
description="Check if the onlineClamp can be locked.")
public void checkConditionsForOpening()
FcsHardwareException@Command(type=QUERY,
level=1,
description="Check if the onlineClamp can be locked.")
public void checkConditionsForClosing()
FcsHardwareException@Command(type=QUERY,
level=1,
description="Initialize controller and check parameters.")
public 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=QUERY,
level=1,
description="Read in the CPU of the controller parameters for mode CURRENT.If a parameter has a different value than in configuration, throws an exception.")
public void checkControllerBeforeAction()
FcsHardwareException@Command(type=ACTION,
level=1,
description="Configure controller.")
public void configureController()
throws org.lsst.ccs.HardwareException
org.lsst.ccs.HardwareExceptionFcsHardwareException@Command(type=ACTION,
level=1,
description="Update state in reading sensors.")
public void updateStateWithSensors(String[] hexaValues)
hexaValues - public boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemModulepublic void updateStateWithSensorsToCheckIfActionIsCompleted()
updateStateWithSensorsToCheckIfActionIsCompleted in class MobileItemModule@Command(type=ACTION,
level=1,
description="Close the ONLINE clamp.")
public void close()
@Command(type=ACTION,
level=1,
description="Unlock the ONLINE clamp.")
public void open()
public void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemModuleaction - FcsHardwareExceptionpublic void sendCurrentToController(int cur)
cur - to be sent to the controllerpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
abortAction in class MobileItemModuleaction - delay - FcsHardwareExceptionpublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItemModuleaction - FcsHardwareException@Command(type=ACTION,
level=1,
description="To configure the online clamps controllers.")
public void configureDigitalInputOfOnlineClamps()
@Command(type=ACTION,
level=1,
description="To configure the online clamps controllers.")
public void configureDigitalOutputOfOnlineClamps()
FcsHardwareExceptionpublic void processUpdate(Observable source, org.lsst.ccs.framework.Module.ValueUpdate v)
processUpdate in interface MovedByEPOSControllerprocessUpdate in class org.lsst.ccs.framework.Modulesource - v - public StatusDataPublishedByAutochangerOnlineClamp createStatusDataPublishedByOnlineClamp()
public void publishData()
publishData in interface MovedByEPOSControllerpublishData in class MobileItemModulepublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemModulepublic void executeCurrentRamp(int initialValue,
int finalValue,
int nbStep,
long period)
initialValue - finalValue - nbStep - period - of time to wait between 2 writes to the controller.Copyright © 2016 LSST. All rights reserved.