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, currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, readSensorsHandle, s, 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)
aborts action actually running.
|
protected void |
activateBrakesAndSetCurrentToZero()
activate brakes on the 3 clamps controllers and set current to 0
|
protected void |
cancelCurrentRamp()
cancels current ramp send signal to all threads waiting for
currentRampEnded condition.
|
void |
checkParametersToCloseClampsX() |
void |
checkParametersToOpenClampsX() |
void |
closeAndLockClamps()
Closes and locks the online clamps.
|
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.
|
protected void |
executeCurrentRampToUnlockAllClamps() |
FcsEnumerations.LockStatus |
getLockStatus() |
void |
homing()
do homing of the 3 clamps
|
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).
|
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 |
unlockAndOpenClamps()
Unlock and open the online clamps.
|
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=3,
description="do homing of the 3 ONLINE clamps : open in CURRENT mode and homing of controller")
public void homing()
@Command(type=ACTION,
level=0,
description="Closes and locks the online clamps.",
timeout=15000)
public void closeAndLockClamps()
FcsHardwareException@Command(type=ACTION,
level=0,
description="Unlock and open the online clamps.",
timeout=15000)
public void unlockAndOpenClamps()
FcsHardwareExceptionpublic void testPeriodTask()
@Command(type=ACTION,
description=" close clamps in mode PROFILE_POSITION for AC1 and AC2")
public void closeClamps()
@Command(type=ACTION,
level=1,
description="Opens the 3 online clamps in mode PROFILE_POSITION.",
timeout=15000)
public void openClamps()
@Command(type=ACTION,
level=1,
description="Locks clamps : closed with a strong pressure (high current).",
timeout=15000)
public void lockClamps()
@Command(type=ACTION,
level=1,
description="unlocks clamps : decreases current in controller to decrease pressure.",
timeout=15000)
public void unlockClamps()
@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)
MobileItemabortAction in class MobileItempublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItemprotected void activateBrakesAndSetCurrentToZero()
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 onlineClampStrain")
public FcsEnumerations.LockStatus computeStrainGaugeLockStatus()
protected void executeCurrentRampToUnlockAllClamps()
protected void cancelCurrentRamp()
protected void waitForEndOfCurrentRamp(int timeout)
@Command(type=QUERY) public void checkParametersToOpenClampsX()
@Command(type=QUERY) public void checkParametersToCloseClampsX()
public void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycleCopyright © 2019 LSST. All rights reserved.