
public class AutochangerOnlineClamp extends MobileItem implements MovedByEPOSController, ControlledBySensors
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_MONITOR_TASK_NAME |
static String |
ONLINE_CLAMP_CONFIG_CATEGORY |
static int |
TIMEOUT_FOR_CLOSING |
static int |
TIMEOUT_FOR_OPENING |
protected boolean |
updatingState |
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, s, scheduleralertSeparater| Constructor and Description |
|---|
AutochangerOnlineClamp(EPOSControllerWithBrake controller,
ComplementarySensors closeSensors,
ComplementarySensors openSensors)
Builds 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 |
build() |
void |
checkConditionsForClosing()
Check if it's safe to close the clamp.
|
void |
checkConditionsForOpening()
Check if it's safe to open the clamp.
|
void |
close()
Closes the ONLINE clamp.
|
void |
closeSoftly(int initialCurrent,
int finalCurrent,
int incrementCurrent,
int waitTime,
int maxTime)
close softly with a ramp of current from initialCurrent to finalCurrent
with an increment incrementCurrent, after first step wait during
waitTime.
|
void |
configureController()
Configure ONLINE clamp controller.
|
void |
configureDigitalInputOfOnlineClamps()
This method is used to configure the controllers of the autochanger
online clamps.
|
void |
configureDigitalOutputOfOnlineClamps()
This method is used to configure the autochanger onlineClamps EPOS
controllers.
|
StatusDataPublishedByAutochangerOnlineClamp |
createStatusDataPublishedByOnlineClamp()
Creates and returns the object to be published on the STATUS bus.
|
void |
decreaseCurrentMonitoringSpeed() |
void |
enableAndCheckControllerBeforeAction()
Enables controller, changes mode into CURRENT, Reads parameters for mode
CURRENT on controller CPU.
|
void |
executeCurrentRamp(int initialCurrent,
int finalCurrent,
int incrementCurrent,
int maxTime,
int waitTime)
Sends current to controller with a ramp : from initialCurrent to
finalCurrent in a given number of steps (nbStep) and waits until the
final value is reached.
|
ComplementarySensors |
getCloseSensors()
returns closeSensors for tests
|
EPOSControllerWithBrake |
getController()
Return ONLINE clamp controller
|
String |
getControllerName()
return controller name
|
int |
getCurrentToClamp()
For simulator
|
int |
getCurrentToOpen()
For simulator
|
int |
getFinalCurrentToClose() |
int |
getIncrementCurrentToClamp() |
int |
getIncrementCurrentToClose() |
int |
getIncrementCurrentToOpen() |
int |
getInitialCurrentToClose() |
int |
getMaxTimeToClose() |
int |
getMaxTimeToLock() |
int |
getMaxTimeToOpen() |
int |
getMaxTimeToUnlock() |
ComplementarySensors |
getOpenSensors()
returns openSensors for tests
|
int |
getSentCurrent()
returns last value of current sent to controller
|
int |
getWaitTimeToClose() |
int |
getWaitTimeToOpen() |
void |
increaseCurrentMonitoringSpeed()
***********************************************************************
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isClosed()
Returns true if LockStatus=CLOSED.
|
boolean |
isCloseSensorsInError()
Returns true if closeSensor and closeSensorC return the same value.
|
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 opened and controller has been configured).
|
boolean |
isInTravel()
Returns true if LockStatus=INTRAVEL.
|
boolean |
isLocked()
Returns true if LockStatus=LOCKED.
|
boolean |
isOpened()
Returns true if LockStatus=OPENED.
|
boolean |
isOpenSensorsInError()
Returns true if openSensor and openSensorC retun the same value.
|
void |
lock()
Locks the ONLINE clamp : sends currentToClamp to the controller with a
ramp of current from currentToClose to currentToRamp.
|
boolean |
myDevicesReady()
Return true when ONLINE clamp hardware is ready.
|
void |
open()
Opens the ONLINE clamp.
|
void |
openSoftly(int initialCurrent,
int finalCurrent,
int incrementCurrent,
int waitTime,
int maxTime) |
void |
postAction(FcsEnumerations.MobileItemAction action)
What to be done after the action is completed.
|
void |
postStart()
This method is called during INITIALIZATION phase.
|
void |
publishData()
publishes data on the STATUS bus
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
sendCurrentToControllerAndSaveValue(int current)
Writes current to controller and saves the current value in the
ConfigurationParameter sentCurrent.
|
void |
setCurrentToClamp(int currentToClamp) |
void |
setCurrentToOpen(int currentToOpen) |
void |
setFinalCurrentToClose(int finalCurrentToClose) |
void |
setIncrementCurrentToClamp(int stepHeightAbsValue) |
void |
setIncrementCurrentToClose(int incrementCurrentToClose) |
void |
setIncrementCurrentToOpen(int incrementCurrentToOpen) |
void |
setInitialCurrentToClose(int initialCurrentToClose) |
void |
setMaxTimeToClose(int maxTimeToClose) |
void |
setMaxTimeToLock(int maxTimeToLock) |
void |
setMaxTimeToOpen(int maxTimeToOpen) |
void |
setMaxTimeToUnlock(int maxTimeToUnlock) |
void |
setSentCurrent(int sentCurrent) |
void |
setWaitTimeToClose(int waitTimeToClose) |
void |
setWaitTimeToOpen(int waitTimeToOpen) |
void |
startAction(FcsEnumerations.MobileItemAction action)
Start action of open or close or lock or unlock.
|
void |
unlock()
Unlocks the ONLINE clamp : sends currentToClamp to the controller with a
ramp of current from currentToClamp to currentToClose.
|
void |
updateCurrent()
read actual current on controller, update field current and publish it on STATUS bus.
|
void |
updateStateAndCheckSensors()
reads sensors, computes and state and raises an ALERT if sensors are in
error.
|
void |
updateStateWithSensors(int[] hexaValues)
This methods updates lockStatus from the values return by the sensors.
|
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.
|
abort, abort, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmonitorCurrentcheckSensors, getNameclearAlarm, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningcheckHardware, checkStartedpublic static final String ONLINE_CLAMP_CONFIG_CATEGORY
public static final String CURRENT_MONITOR_TASK_NAME
public static final int TIMEOUT_FOR_CLOSING
public static final int TIMEOUT_FOR_OPENING
protected volatile boolean updatingState
public AutochangerOnlineClamp(EPOSControllerWithBrake controller, ComplementarySensors closeSensors, ComplementarySensors openSensors)
controller - closeSensors - openSensors - @ConfigurationParameterChanger public void setCurrentToClamp(int currentToClamp)
@ConfigurationParameterChanger public void setCurrentToOpen(int currentToOpen)
@ConfigurationParameterChanger public void setInitialCurrentToClose(int initialCurrentToClose)
@ConfigurationParameterChanger public void setFinalCurrentToClose(int finalCurrentToClose)
@ConfigurationParameterChanger public void setSentCurrent(int sentCurrent)
sentCurrent - @ConfigurationParameterChanger public void setIncrementCurrentToClamp(int stepHeightAbsValue)
stepHeightAbsValue - @ConfigurationParameterChanger public void setIncrementCurrentToOpen(int incrementCurrentToOpen)
@ConfigurationParameterChanger public void setIncrementCurrentToClose(int incrementCurrentToClose)
@ConfigurationParameterChanger public void setWaitTimeToClose(int waitTimeToClose)
@ConfigurationParameterChanger public void setWaitTimeToOpen(int waitTimeToOpen)
@ConfigurationParameterChanger public void setMaxTimeToClose(int maxTimeToClose)
@ConfigurationParameterChanger public void setMaxTimeToOpen(int maxTimeToOpen)
@ConfigurationParameterChanger public void setMaxTimeToLock(int maxTimeToLock)
@ConfigurationParameterChanger public void setMaxTimeToUnlock(int maxTimeToUnlock)
public int getInitialCurrentToClose()
public int getFinalCurrentToClose()
public int getIncrementCurrentToOpen()
public int getIncrementCurrentToClamp()
public int getIncrementCurrentToClose()
public int getMaxTimeToClose()
public int getWaitTimeToClose()
public int getMaxTimeToOpen()
public int getMaxTimeToLock()
public int getMaxTimeToUnlock()
public int getWaitTimeToOpen()
public int getSentCurrent()
public EPOSControllerWithBrake getController()
public int getCurrentToOpen()
public int getCurrentToClamp()
public ComplementarySensors getCloseSensors()
public ComplementarySensors getOpenSensors()
@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()
isInError in interface ControlledBySensors@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=LOCKED. Doesn\'t read again sensors.") public boolean isLocked()
@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 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 opened and controller is configured.") public boolean isInitialized()
public void build()
build in interface org.lsst.ccs.framework.HasLifecyclepublic void increaseCurrentMonitoringSpeed()
public void decreaseCurrentMonitoringSpeed()
@Command(type=QUERY, level=1, description="Returns true if controller is initialized and configured.") public boolean myDevicesReady()
myDevicesReady in class MobileItem@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()
FcsHardwareExceptionpublic void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycle@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 enableAndCheckControllerBeforeAction()
FcsHardwareException@Command(type=ACTION, level=1, description="Configure controller.") public void configureController()
FcsHardwareExceptionpublic void updateCurrent()
updateCurrent in interface MovedByEPOSControllerpublic void updateStateAndCheckSensors()
@Command(type=ACTION, level=1, description="Update state in reading sensors.") public void updateStateWithSensors(int[] hexaValues)
hexaValues - public void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItem@Command(type=ACTION, level=1, description="Closes the ONLINE clamp.", timeout=15000) public void close()
@Command(type=ACTION, level=1, description="Closes the ONLINE clamp softly with new parameters and saves the new parameters.", timeout=15000) public void closeSoftly(int initialCurrent, int finalCurrent, int incrementCurrent, int waitTime, int maxTime)
initialCurrent - finalCurrent - incrementCurrent - waitTime - maxTime - @Command(type=ACTION, level=1, description="Open the ONLINE clamp softly with new parameters. Does not save the parameters. To save parameters use change command.", timeout=15000) public void openSoftly(int initialCurrent, int finalCurrent, int incrementCurrent, int waitTime, int maxTime)
@Command(type=ACTION, level=1, description="Opens the ONLINE clamp.", timeout=15000) public void open()
@Command(type=ACTION, level=1, description="Locks the ONLINE clamp : sends currentToClamp to the controller with a ramp of currentfrom currentToClose to currentToRamp.", timeout=15000) public void lock()
@Command(type=ACTION, level=1, description="Unlocks the ONLINE clamp : sends currentToClamp to the controller with a ramp of current from currentToClamp to currentToClose.", timeout=15000) public void unlock()
public void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemaction - FcsHardwareException@Command(type=ACTION, description="sent current to control and save this value") public void sendCurrentToControllerAndSaveValue(int current)
current - to send to controllerpublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
abortAction in class MobileItemaction - delay - FcsHardwareExceptionpublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItemaction - 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 StatusDataPublishedByAutochangerOnlineClamp createStatusDataPublishedByOnlineClamp()
public void publishData()
MovedByEPOSControllerpublishData in interface MovedByEPOSControllerpublishData in class MobileItempublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItempublic void executeCurrentRamp(int initialCurrent,
int finalCurrent,
int incrementCurrent,
int maxTime,
int waitTime)
initialCurrent - first value to be sent to controllerfinalCurrent - last value to send to controllerincrementCurrent - maxTime - waitTime - time to wait after sending initialCurrent to controller.Copyright © 2017 LSST. All rights reserved.