public class AutochangerThreeOnlineClamps extends MobileItem implements ControlledBySensors
| Modifier and Type | Field and Description |
|---|---|
protected Autochanger |
autochanger |
protected AutochangerOnlineClamp[] |
clampsList |
protected ScheduledFuture<?> |
currentRampHandle |
protected int |
maxTimeToCloseClampsX |
protected int |
maxTimeToLockAllClamps |
protected int |
maxTimeToOpenClampsX |
protected int |
maxTimeToUnlockAllClamps |
protected int |
minPeriod |
protected AutochangerOnlineClamp |
onlineClampXminus |
protected AutochangerOnlineClamp |
onlineClampXplus |
protected AutochangerOnlineClamp |
onlineClampYminus |
protected int |
timeoutForLockingClamps |
protected int |
timeoutForUnlockingClamps |
agentStateService, commandDuration, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, scheduleralertSeparator| Constructor and Description |
|---|
AutochangerThreeOnlineClamps(AutochangerOnlineClamp onlineClampXminus,
AutochangerOnlineClamp onlineClampXplus,
AutochangerOnlineClamp onlineClampYminus)
Create a AutochangerThreeOnlineClamps with 3 AutochangerOnlineClamp.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
What to do to abort an action.
|
protected void |
activateBrakesAndDisableOperation()
activate brakes on the 3 clamps controllers, set current to 0 and disable
operation.
|
protected void |
cancelCurrentRamp()
cancels current ramp send signal to all threads waiting for
currentRampEnded condition.
|
void |
checkParametersToCloseClampsX() |
void |
checkParametersToOpenClampsX() |
void |
closeClamps()
close clamps in mode PROFILE_POSITION.
|
FcsEnumerations.LockStatus |
computeStrainGaugeLockStatus()
return a lock status computed from strain read on onlineStrainGauge.
|
StatusDataPublishedByAutochangerThreeClamps |
createStatusDataPublishedByThreeClamps()
Creates an object to be published on the status bus.
|
protected void |
doLock() |
protected void |
doUnlock()
unlock clamps : clamps are LOCKED with a high pressure (currentToClamp
previously sent to controllers) avoid an elastic return we send
currentToClamp BEFORE the brakes are released.
|
protected void |
enableAndCheckControllersBeforeAction(FcsEnumerations.MobileItemAction action)
Check that the 3 controllers of the clamps are lockStatusInitialized and
that parameters are correct.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
What to do to end an action.
|
protected void |
executeCurrentRampToUnlockAllClamps() |
FcsEnumerations.LockStatus |
getLockStatus() |
void |
homing()
do homing of the 3 clamps
|
void |
initializeHardware()
initialize AC online clamps hardware after initialization.
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action)
returns true if the action given as argument is completed.
|
boolean |
isClosed()
Returns true if LockStatus=CLOSED
|
boolean |
isHomingDone() |
boolean |
isInError()
Returns true if LockStatus=ERROR
|
boolean |
isInitialized()
Return true if the 3 onlineClamps hardware is lockStatusInitialized.
|
boolean |
isLocked()
Returns true if LockStatus=LOCKED
|
boolean |
isLockStatusInitialized() |
boolean |
isOpened()
Returns true if LockStatus=OPENED
|
void |
lockClamps()
Locks clamps : closed with a strong pressure (high current).
|
void |
lockFilterAtOnline()
to be used by setFilter
|
boolean |
myDevicesReady()
Return true if the 3 onlineClamps hardware is ready.
|
void |
openClamps()
Opens the 3 clamps.
|
void |
postStart() |
void |
publishData() |
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
setMinPeriod(int minPeriod)
set a minimal value for current ramps period
|
void |
startAction(FcsEnumerations.MobileItemAction action)
starts the action given as argument.
|
void |
testPeriodTask()
test periodicTask.
|
void |
unlockClamps()
Unlocks clamps : slows down current sent to controller in order to
decrease pressure on the clamps.
|
void |
updateState()
This methods updates lockStatus from the values return by the sensors.
|
protected void |
updateStateAndCheckSensors() |
void |
updateStateWithSensorsToCheckIfActionIsCompleted()
reads sensors, computes new lockStatus.
|
protected void |
waitForEndOfCurrentRamp(int timeout)
This method waits until the newCurrentValue ramp is completed.
|
cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckSensorsclearAlarm, getAlertSeparator, getAlertService, getName, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning@LookupField(strategy=TREE) protected Autochanger autochanger
protected final AutochangerOnlineClamp onlineClampXminus
protected final AutochangerOnlineClamp onlineClampXplus
protected final AutochangerOnlineClamp onlineClampYminus
protected final AutochangerOnlineClamp[] clampsList
protected ScheduledFuture<?> currentRampHandle
@ConfigurationParameter(description="timeout in milliseconds : if closing the clamps last more than this amount of time, then the subsystem goes in ERROR.") protected int timeoutForLockingClamps
@ConfigurationParameter(description="timeout in milliseconds : if unlocking the clamps last more than this amount of time, then the subsystem goes in ERROR.") protected int timeoutForUnlockingClamps
@ConfigurationParameter(description="maximum time in milliseconds to lock the 3 clamps") protected int maxTimeToLockAllClamps
@ConfigurationParameter(description="maximum time in milliseconds to unlock the 3 clamps") protected int maxTimeToUnlockAllClamps
@ConfigurationParameter(description="maximum time in milliseconds to open the 3 clamps") protected int maxTimeToOpenClampsX
@ConfigurationParameter(description="maximum time in milliseconds to close the 3 clamps") protected int maxTimeToCloseClampsX
@ConfigurationParameter(description="minimal period for current ramps. should be > 50") protected int minPeriod
public AutochangerThreeOnlineClamps(AutochangerOnlineClamp onlineClampXminus, AutochangerOnlineClamp onlineClampXplus, AutochangerOnlineClamp onlineClampYminus)
onlineClampXminus - onlineClampXplus - onlineClampYminus - @Command(type=QUERY,
level=0,
description="Returns true if lockStatus has been first initialized from strain.")
public boolean isLockStatusInitialized()
@Command(type=QUERY,
level=0,
description="Returns true if homing has been done for the 3 ONLINE clamp controllers.")
public boolean isHomingDone()
@ConfigurationParameterChanger public void setMinPeriod(int minPeriod)
minPeriod - public FcsEnumerations.LockStatus getLockStatus()
@Command(type=QUERY,
level=0,
description="Returns true if the 3 clamps are LOCKED.")
public boolean isLocked()
@Command(type=QUERY,
level=0,
description="Returns true if the 3 clamps are CLOSED.")
public boolean isClosed()
@Command(type=QUERY,
level=0,
description="Returns true if the 3 clamps are OPENED.")
public boolean isOpened()
@Command(type=QUERY,
level=0,
description="Returns true if one of the clamp is in error.")
public boolean isInError()
isInError in interface ControlledBySensors@Command(type=QUERY,
level=0,
description="Return true if the 3 onlineClamps hardware is ready : controllers ready, controllers parameters checked and controllers configured.")
public boolean isInitialized()
protected void enableAndCheckControllersBeforeAction(FcsEnumerations.MobileItemAction action)
action - @Command(type=ACTION,
level=2,
description="do homing of the 3 ONLINE clamps : open in CURRENT mode and homing of controller",
timeout=6000)
public void homing()
public void testPeriodTask()
public void closeClamps()
public void openClamps()
public void lockClamps()
public void unlockClamps()
public void lockFilterAtOnline()
@Command(type=QUERY,
level=0,
description="Return true if the 3 onlineClamps hardware is ready.")
public boolean myDevicesReady()
myDevicesReady in class MobileItempublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItemaction - public void updateStateWithSensorsToCheckIfActionIsCompleted()
updateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic void startAction(FcsEnumerations.MobileItemAction action)
MobileItemstartAction in class MobileItempublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
abortAction in class MobileItemaction - delay - FcsHardwareExceptionpublic void endAction(FcsEnumerations.MobileItemAction action)
endAction in class MobileItemaction - FcsHardwareExceptionpublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemprotected void activateBrakesAndDisableOperation()
protected void doLock()
protected void doUnlock()
public StatusDataPublishedByAutochangerThreeClamps createStatusDataPublishedByThreeClamps()
public void publishData()
publishData in class MobileItemprotected void updateStateAndCheckSensors()
@Command(type=ACTION,
level=1,
description="Update state from sensors values.")
public void updateState()
@Command(type=QUERY,
level=1,
description="Return a lock status computed from the normalizedStrain value")
public FcsEnumerations.LockStatus computeStrainGaugeLockStatus()
protected void executeCurrentRampToUnlockAllClamps()
protected void cancelCurrentRamp()
protected void waitForEndOfCurrentRamp(int timeout)
public void checkParametersToOpenClampsX()
public void checkParametersToCloseClampsX()
@Command(type=QUERY,
level=1,
description="Initialize AC online clamps hardware after initialization. To be executed if during boot process some hardware is missing.")
public void initializeHardware()
public void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycleCopyright © 2019 LSST. All rights reserved.