public class CarouselClamp extends MobileItem implements MovedByEPOSController
| Modifier and Type | Field and Description |
|---|---|
protected EPOSController |
controller
The motor controller which controls this clamp.
|
protected int |
currentToUnlock |
protected Integer |
filterPresenceMinLimit
if filter presence sensor returns a value between 0 and filterPresenceOffset1
: sensor is in error.
|
protected Integer |
filterPresenceOffset2
if filter presence sensor returns a value between filterPresenceOffset1 and
filterPresenceOffset2 : the filter is engaged and lockable.
|
protected Integer |
filterPresenceOffset3
Deprecated.
|
protected Integer |
lockSensorOffset1
If lockSensor returns a value between lockSensorMinLimit and
lockSensorOffset1 the clamp is unlocked, If lockSensor returns a value
between lockSensorOffset1 and carousel.getLockSensorMinLocked(): we don't
know, If the sensor returns a value between
carousel.getLockSensorMinLocked() and lockSensorMaxValue: the clamp is
locked.
|
protected BridgeToHardware |
tcpProxy |
protected long |
timeoutForReleasing |
protected long |
timeoutForUnlocking |
agentStateService, beginTime, commandDuration, currentAction, dataProviderDictionaryService, FCSLOG, hasToWaitForEndOfAction, lock, moving, name, path, readSensorsHandle, scheduler, subs, timeoutExceededalertSeparator| Constructor and Description |
|---|
CarouselClamp() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
build() |
void |
checkAndUpdateOffset1(int newOffset1)
compare offset1 value given as argument with persisted value.
|
void |
checkAndUpdateOffset2(int newOffset2)
compare offset2 value given as argument with persisted value.
|
void |
checkVelocity() |
StatusDataPublishedByCarouselClamp |
createStatusDataPublishedByClamp()
Create an object to be published on the STATUS bus.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
end current action.
|
FcsEnumerations.FilterClampState |
getClampState()
Returns the clampState of the clamp.
|
EPOSController |
getController() |
short |
getCurrentToUnlock()
Returns the amount of current needed to unlock this clamp.
|
int |
getFilterPresenceMinLimit() |
int |
getFilterPresenceOffset2()
For simulation
|
SensorPluggedOnTTC580 |
getFilterPresenceSensor()
For simulation.
|
FcsEnumerations.FilterPresenceStatus |
getFilterPresenceStatus() |
SensorPluggedOnTTC580 |
getLockSensor()
For simulation.
|
int |
getLockSensorMaxLimit() |
int |
getLockSensorMinLimit() |
int |
getLockSensorOffset1() |
FcsEnumerations.LockStatus |
getLockStatus() |
ArrayList<String> |
getSensorErrorCounter() |
void |
init()
*** lifecycle methods *************************************************
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAvailable() |
boolean |
isFilterEngaged() |
boolean |
isLocked()
This methods returns true if the clamp is locked.
|
boolean |
isReleased()
Check if controller has been disabled.
|
boolean |
isXminus() |
boolean |
myDevicesReady()
*
|
void |
postStart() |
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
recoveryLocking()
To recover locking when clampXplus is LOCKED and not clampXminus.
|
void |
release()
The clamps on the carousel are locked automatically when the filter comes at
the standby position.
|
void |
setAvailable(boolean available) |
protected void |
setController(EPOSController actuator)
In the initialization phase, this method is used to initialize the
controller.
|
void |
setFilterPresenceOffset2(Integer value) |
void |
startAction(FcsEnumerations.MobileItemAction action)
starts the action given as argument.
|
void |
unlock()
Unlock the clamp when a filter is locked by the clamp.
|
void |
updateFilterPresenceStatus()
update filterPresenceStatus from value returned by filterPresenceSensor
|
void |
updateLockStatus()
Update lockStatus from value returned by lockSensor.
|
void |
updateState()
Update clampState from values sent by 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.
|
void |
updateVelocity() |
cancelReadingSensors, checkReadyForAction, executeAction, getActionDurationPath, getAlertService, getHaltRequired, getName, getPath, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, registerAction, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetControllerNameclearAlarm, getAlertSeparator, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNew@LookupField(strategy=TREE,
pathFilter="canbus0")
protected BridgeToHardware tcpProxy
protected EPOSController controller
@ConfigurationParameter(description="value of current to send to controller to unlock carousel clamp",
range="-6000..6000",
units="mA",
category="carousel")
protected volatile int currentToUnlock
@Persist protected volatile Integer lockSensorOffset1
protected Integer filterPresenceMinLimit
@Persist protected volatile Integer filterPresenceOffset2
@Deprecated @ConfigurationParameter(description="an offset for tests after carousel has been transported", range="0..1000", units="mV", category="carousel") protected volatile Integer filterPresenceOffset3
@ConfigurationParameter(range="0..10000",
units="millisecond",
category="carousel")
protected volatile long timeoutForUnlocking
@ConfigurationParameter(range="0..10000",
units="millisecond",
category="carousel")
protected volatile long timeoutForReleasing
public void build()
build in interface org.lsst.ccs.framework.HasLifecyclepublic short getCurrentToUnlock()
public ArrayList<String> getSensorErrorCounter()
protected void setController(EPOSController actuator)
actuator - public int getLockSensorOffset1()
public int getLockSensorMaxLimit()
public int getLockSensorMinLimit()
public int getFilterPresenceMinLimit()
public int getFilterPresenceOffset2()
public SensorPluggedOnTTC580 getFilterPresenceSensor()
public SensorPluggedOnTTC580 getLockSensor()
@Command(type=QUERY,
level=1,
description="return the lockStatus")
public FcsEnumerations.LockStatus getLockStatus()
@Command(type=QUERY,
level=1,
description="return filterPresenceStatus")
public FcsEnumerations.FilterPresenceStatus getFilterPresenceStatus()
public void setFilterPresenceOffset2(Integer value)
public boolean isAvailable()
public void setAvailable(boolean available)
public void init()
init in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
level=1,
description="Returns true if CANopen hardware is connected and ready.")
public boolean myDevicesReady()
myDevicesReady in class MobileItempublic FcsEnumerations.FilterClampState getClampState()
@Command(type=QUERY,
level=1,
description="Returns true if the clamp is locked")
public boolean isLocked()
@Command(type=QUERY,
level=1,
description="Returns true if filter is engaged on the clamp : filter presence sensors sees it ")
public boolean isFilterEngaged()
public void checkAndUpdateOffset1(int newOffset1)
newOffset1 - public void checkAndUpdateOffset2(int newOffset2)
newOffset2 - public boolean isXminus()
public void updateFilterPresenceStatus()
public void updateLockStatus()
FcsHardwareExceptionpublic void updateState()
FcsHardwareExceptionpublic void publishData()
publishData in interface MovedByEPOSControllerpublishData in class MobileItempublic StatusDataPublishedByCarouselClamp createStatusDataPublishedByClamp()
@Command(level=3,
type=ACTION,
description="Release clamp in order to get ready to clamp a filter again")
public void release()
@Command(level=3,
type=ACTION,
description="Check if controller has been disabled. For end user.")
public boolean isReleased()
@Command(type=ACTION,
level=3,
description="Unlock the clamp")
public void unlock()
public void recoveryLocking()
public void startAction(FcsEnumerations.MobileItemAction action)
MobileItemstartAction in class MobileItempublic boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemabortAction in class MobileItempublic void endAction(FcsEnumerations.MobileItemAction action)
MobileItemendAction in class MobileItempublic void checkVelocity()
public void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItempublic EPOSController getController()
getController in interface MovedByEPOSControllerpublic void updateVelocity()
public void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycleCopyright © 2023 LSST. All rights reserved.