
public class Carousel extends MobileItem implements FilterHolder, AlertRaiser
| Modifier and Type | Field and Description |
|---|---|
protected int |
absoluteTargetPosition
an absolute target position to reach in a rotation is modified each time a
rotation command has been launched.
|
protected ADCInterface |
ai814 |
protected EPOSControllerForCarousel |
carouselController |
protected boolean |
clampsStateInitialized |
protected int |
currentToPrepareUnlock |
int |
fastAcceleration |
int |
fastDeceleration |
int |
fastRotationTimeout |
int |
fastVelocity |
protected int |
minLockedThreshold
Threshold that gives the 'locked' status to the clamps.
|
protected int |
position
carousel position given by carouselControl.
|
protected boolean |
powerSave |
protected int |
readCurrent |
protected int |
readVelocity |
int |
recoveryBackwardStep |
int |
recoveryForwardStep |
int |
recoveryLockingCurrent |
int |
recoveryMaxVelocity |
protected Map<String,SensorPluggedOnTTC580> |
sensorsMap
map of sensors attached to this device.
|
int |
slowAcceleration |
int |
slowDeceleration |
int |
slowRotationTimeout |
int |
slowVelocity |
protected CarouselSocket |
socketAtStandby |
protected Map<String,CarouselSocket> |
socketsMap
A map to store the sockets by their names.
|
protected int |
startPosition
startPosition is the absolute position at the begining of a rotation.
|
protected BridgeToHardware |
tcpProxy |
protected int |
timeToPrepareUnlock |
long |
timeToUpdateProtectionSystem |
agentStateService, beginTime, commandDuration, currentAction, dataProviderDictionaryService, FCSLOG, hasToWaitForEndOfAction, lock, moving, name, readSensorsHandle, scheduler, subs, timeoutExceededalertSeparator| Constructor and Description |
|---|
Carousel() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
build() |
void |
changeFilterID(int filterID,
int socketID) |
void |
checkConditionsForRotation()
Check if carousel rotation is permitted.
|
void |
checkDeltaPosition() |
void |
checkSensorTypeIncremental() |
StatusDataPublishedByCarousel |
createStatusDataPublishedByCarousel()
Create an object StatusDataPublishedByCarousel to be published on the STATUS
bus.
|
void |
endAction(FcsEnumerations.MobileItemAction action)
end current action.
|
FcsEnumerations.FilterClampState |
getClampsStateAtStandby() |
CarouselClamp |
getClampXminus()
This method returns the clampX- which is at standby filterPosition.
|
EPOSController |
getClampXminusController() |
CarouselClamp |
getClampXplus()
This method returns the clampX+ which is at standby filterPosition.
|
EPOSController |
getClampXplusController() |
int |
getCurrentToPrepareUnlock() |
String |
getFilterAtStandbyName()
Returns name of filter which is in the socket at STANDBY position or
NO_FILTER if there is no filter at STANDBY.
|
int |
getFilterID() |
int |
getFilterIDatStandby()
Returns ID of filter which is in the socket at STANDBY position or 0 if there
is no filter at STANDBY.
|
int |
getFilterPresenceMinNoFilter() |
CarouselSocket |
getFilterSocket(int filterID) |
int |
getFullTurn()
used by tests.
|
int |
getLockSensorMaxLimitXminus() |
int |
getLockSensorMaxLimitXplus() |
int |
getLockSensorMinLimitXminus() |
int |
getLockSensorMinLimitXplus() |
Integer |
getMinLockedThreshold() |
int |
getPosition()
return carousel position.
|
int |
getRecoveryLockingCurrent() |
int |
getRecoveryMaxVelocity() |
CarouselSocket |
getSocketAtStandby()
Return the socket HALTED at STANDBY filterPosition if there is one.
|
int |
getSocketAtStandbyID() |
CarouselSocket |
getSocketByName(String socketName)
Return a CarouselSocket which name is given as parameter.
|
Map<String,CarouselSocket> |
getSocketsMap() |
int |
getTimeToPrepareUnlock() |
void |
init() |
void |
initializeAndCheckClampsOffset() |
void |
initializeClampsState()
In carousel, sensors are updated from PDOs.
|
void |
initializeHardware()
initialize carousel hardware after initialization.
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoff()
This method returns true if the autochanger trucks are at HANDOFF position,
false otherwise.
|
boolean |
isAtOnline()
Overridden method from FilterHolder
|
boolean |
isAtStandby()
Used to publish on the STATUS bus for the GUI.
|
boolean |
isAtStandby(int filterID)
Return true if the filterID given as argument is at STANDBY position.
|
boolean |
isAutochangerHoldingFilter()
This methods returns true if the autochanger is holding a filter at STANDBY
position.
|
boolean |
isClampsStateInitialized() |
boolean |
isEmptyAtStandby() |
boolean |
isFilterOnCarousel(int filterID)
return true if filterID in on carousel.
|
boolean |
isHoldingFilter()
Return true if carousel is holding a filter at STANDBY position.
|
boolean |
isHoldingFilterAtStandby() |
boolean |
isNotHoldingFilter()
Return true if FilterHolder is NOT holding filter, false otherwise.
|
boolean |
isReadyToGrabAFilterAtStandby()
This method let us know if the carousel is ready to receive a filter at
standby filterPosition : - the carousel must not rotate - an empty
socketAtStandby is at standby filterPosition.
|
boolean |
isRotating()
Returns true if carousel is rotating
|
boolean |
isRotationAllowedByPLC() |
boolean |
isUnclampAllowedByPLC() |
boolean |
isUnclampedOnFilterAtStandby() |
boolean |
myDevicesReady()
Return True if all CAN open devices useful for this MobileItemMobile are
ready for an action.
|
void |
persistData() |
void |
postStart()
Executed when all components HasLifeCycle of subsystem have been checked.
|
void |
powerSafeActivate() |
void |
powerSafeDisactivate() |
void |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
long |
readLockSensorMinLocked() |
void |
readTemperatures() |
void |
recoveryLockingXminus()
This is a recovery command when storing a carousel at STANDBY : sometimes,
clampXplus is LOCKED but clampXminus is not LOCKED.
|
void |
recoveryRotationBackward() |
void |
recoveryRotationForward() |
void |
recoveryRotationStraight() |
void |
releaseClamps()
Release clamps at standby position to get ready to clamp again.
|
void |
releaseClampsContact() |
void |
rotateFullTurn(int nbTurn)
Rotate carousel full turn.
|
void |
rotateSocketToStandby(String socketName)
Rotate carousel to move a socket which name is given as argument to STANDBY
position.
|
void |
rotateToAbsolutePosition(int newPos)
Rotate to position newPos.
|
void |
rotateToRelativePosition(int relativePos,
long timeout)
rotate carousel within a relative position given as argument.
|
void |
setControllerPositionSensorTypeEncoderSSI() |
void |
setFastMode() |
void |
setSlowMode() |
void |
startAction(FcsEnumerations.MobileItemAction action)
Starts action ROTATE_CAROUSEL_TO_ABSOLUTE_POSITION or
ROTATE_CAROUSEL_TO_RELATIVE_POSITION.
|
void |
unlockClamps()
Unlocks the clamps at STANDBY.
|
void |
updateClampsStateWithSensorsFromPDO()
Read the clamps state from PDO : all the clamp sensors are read at one time.
|
void |
updateCurrent()
Updates the field readCurrent in reading the CPU of the controller.
|
void |
updateMinLockedThreshold()
read lockSensorMinLocked on hyttc580.
|
void |
updatePosition()
Updates the filterPosition of the carousel in reading the CPU of the
controller.
|
void |
updateSocketAtStandbyState() |
void |
updateSocketAtStandbyWithSensors()
****************************************************************
|
void |
updateSocketNotAtStandby() |
void |
updateState() |
void |
updateStateWithSensors()
Read the clamps state from PDO : all the clamp sensors are read at one time.
|
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 |
updateTemperatures()
read Temperatures on pt100.
|
void |
waitForProtectionSystemUpdate() |
void |
waitForStateUnclampedOnFilter(long timeout)
wait until carousel is unclamped and empty at standby
|
cancelReadingSensors, checkReadyForAction, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, registerAction, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewprotected int position
protected int absoluteTargetPosition
protected int startPosition
protected int readVelocity
protected int readCurrent
protected boolean powerSave
@ConfigurationParameter(description="velocity in slow mode [rpm]",
units="unitless",
range="0..5000",
category="carousel")
public volatile int slowVelocity
@ConfigurationParameter(description="acceleration in slow mode [rpm/s]",
units="unitless",
range="0..5000",
category="carousel")
public volatile int slowAcceleration
@ConfigurationParameter(description="deceleration in slow mode [rpm/s]",
units="unitless",
range="0..5000",
category="carousel")
public volatile int slowDeceleration
@ConfigurationParameter(description="in milliseconds; timeout for the rotation in slow mode",
units="millisecond",
range="0..300000",
category="carousel")
public volatile int slowRotationTimeout
@ConfigurationParameter(description="velocity in fast mode [rpm]",
units="unitless",
range="0..5000",
category="carousel")
public volatile int fastVelocity
@ConfigurationParameter(description="acceleration in fast mode [rpm/s]",
units="unitless",
range="0..5000",
category="carousel")
public volatile int fastAcceleration
@ConfigurationParameter(description="deceleration in fast mode [rpm/s]",
units="unitless",
range="0..5000",
category="carousel")
public volatile int fastDeceleration
@ConfigurationParameter(description="in milliseconds; timeout for the rotation in fast mode",
units="millisecond",
range="0..300000",
category="carousel")
public volatile int fastRotationTimeout
@ConfigurationParameter(description="This is the time to wait until protection system changes its status after motions.",
units="millisecond",
range="0..5000",
category="carousel")
public volatile long timeToUpdateProtectionSystem
@ConfigurationParameter(description="for command unlock of carousel clamp : current to send to prepare unlock",
range="-3200..3200",
units="mA",
category="carousel")
protected volatile int currentToPrepareUnlock
@ConfigurationParameter(description="for command unlock of carousel clamp : time between little current to prepare hardware and currentToLock ",
range="0..500",
units="millisecond",
category="carousel")
protected volatile int timeToPrepareUnlock
@ConfigurationParameter(description="A current to be sent to clampXminus controller during locking recovery.",
units="mV",
range="0..1000",
category="carousel")
public volatile int recoveryLockingCurrent
@ConfigurationParameter(description="If the velocity in clampXminus controller goes over this value during locking recovery, it means that the recovery process has failed. [rpm]",
units="unitless",
range="0..100",
category="carousel")
public volatile int recoveryMaxVelocity
@ConfigurationParameter(description="A number of steps to go back if after rotation carousel position has exceeded standbyPosition by more than maxStandbyDeltaPosition. [carousel encoder step]",
units="unitless",
range="0..2181120",
category="carousel")
public volatile int recoveryBackwardStep
@ConfigurationParameter(description="A number of steps to go back if after rotation carousel position has exceeded standbyPosition by more than maxStandbyDeltaPosition. [carousel encoder step]",
units="unitless",
range="0..2181120",
category="carousel")
public volatile int recoveryForwardStep
@LookupField(strategy=TREE,
pathFilter=".*\\/carouselController")
protected EPOSControllerForCarousel carouselController
@LookupField(strategy=TREE,
pathFilter=".*\\/ai814")
protected ADCInterface ai814
@LookupField(strategy=CHILDREN) protected final Map<String,CarouselSocket> socketsMap
@LookupField(strategy=TREE) protected Map<String,SensorPluggedOnTTC580> sensorsMap
@LookupField(strategy=SIBLINGS,
pathFilter="tcpProxy")
protected BridgeToHardware tcpProxy
protected boolean clampsStateInitialized
protected CarouselSocket socketAtStandby
protected volatile int minLockedThreshold
public void build()
build in interface org.lsst.ccs.framework.HasLifecyclepublic void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic boolean isRotationAllowedByPLC()
public boolean isUnclampAllowedByPLC()
@Command(type=QUERY, level=0, description="Return true if clamp state is initialized for all clamps.") public boolean isClampsStateInitialized()
public int getCurrentToPrepareUnlock()
public int getTimeToPrepareUnlock()
public Integer getMinLockedThreshold()
public int getLockSensorMinLimitXminus()
public int getLockSensorMinLimitXplus()
public int getLockSensorMaxLimitXminus()
public int getLockSensorMaxLimitXplus()
public int getFilterPresenceMinNoFilter()
public int getRecoveryLockingCurrent()
public int getRecoveryMaxVelocity()
public int getFullTurn()
public Map<String,CarouselSocket> getSocketsMap()
public CarouselSocket getSocketByName(String socketName)
socketName - @Command(type=QUERY, level=0, description="Return carousel position.", alias="printPosition") public int getPosition()
public EPOSController getClampXminusController()
public EPOSController getClampXplusController()
public CarouselClamp getClampXminus()
public CarouselClamp getClampXplus()
@Command(type=QUERY, level=0, description="Return true if a socket is HALTED at STANDBY position, false otherwise.") public boolean isAtStandby()
isAtStandby in interface FilterHolderpublic CarouselSocket getSocketAtStandby()
@Command(type=QUERY, level=0, description="return ID of socket at STANDBY, 0 if carousel is not stopped at STANDBY") public int getSocketAtStandbyID()
@Command(type=QUERY, level=0, description="Returns name of filter at STANDBY position or NO_FILTER if carousel is not at STANDBY or there is no filter at STANDBY.") public String getFilterAtStandbyName()
@Command(type=QUERY, level=0, description="Returns id of filter at STANDBY position or 0 if there is no filter at STANDBY.") public int getFilterIDatStandby()
public boolean isFilterOnCarousel(int filterID)
filterID - @Command(type=ACTION, level=1, description="To change filterID on socket which ID is given as argument.") public void changeFilterID(int filterID, int socketID)
@Command(type=QUERY, level=0, description="Return true if Autochanger is holding filter at STANDBY.") public boolean isAutochangerHoldingFilter()
FcsHardwareException@Command(type=QUERY, level=1, description="Initialize carousel 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.HasLifecycle@Command(type=ACTION, level=3, description="Disable carousel controller, set the position sensor to TypeEncoderSSI, and check that the ssi position is correct.") public void setControllerPositionSensorTypeEncoderSSI()
@Command(type=ACTION, level=1, description="slow down profile velocity, acceleration and deceleration in carousel controller.") public void setSlowMode()
@Command(type=ACTION, level=1, description="raise profile velocity, acceleration and deceleration in carousel controller.") public void setFastMode()
public void waitForProtectionSystemUpdate()
public void waitForStateUnclampedOnFilter(long timeout)
timeout - after this delay don't wait anymore.public void checkSensorTypeIncremental()
@Command(type=QUERY, level=1, description="save persist file to store which filter is in socket and clamps offsets") public void persistData()
public void publishData()
publishData in class MobileItempublic StatusDataPublishedByCarousel createStatusDataPublishedByCarousel()
@Command(type=QUERY, level=1, description="Returns true if Carousel is stopped and no filter is at STANDBY position") public boolean isReadyToGrabAFilterAtStandby()
FcsHardwareException@Command(type=QUERY, level=1, description="Returns true if a filter is clamped at STANDBY position") public boolean isHoldingFilterAtStandby()
@Command(type=QUERY, level=1, description="Returns false if carousel controller is SWITCH_ON_DISABLED.") public boolean isRotating()
@Command(type=ACTION, level=1, description="Set position sensor type SSI and update carousel position in reading controller.") public void updatePosition()
SDORequestException@Command(type=QUERY, level=1, description="Update field current in reading controller.") public void updateCurrent()
SDORequestExceptionpublic void updateClampsStateWithSensorsFromPDO()
FcsHardwareException@Command(type=QUERY, level=1, description="Update clamps state in sending 5 sync.") public void initializeClampsState()
@Command(type=QUERY, level=1, description="Update clamp offsets.") public void initializeAndCheckClampsOffset()
public CarouselSocket getFilterSocket(int filterID)
filterID - @Command(type=ACTION, level=1, description="Release clamps at standby position to get ready to clamp again") public void releaseClamps()
@Command(type=ACTION, level=3, description="Unlock the clamps at STANDBY.") public void unlockClamps()
@Command(type=ACTION, level=1, description="Lock clampXminus when clampXplus is already locked.") public void recoveryLockingXminus()
public boolean isAtStandby(int filterID)
filterID - public void releaseClampsContact()
public boolean myDevicesReady()
MobileItemmyDevicesReady in class MobileItem@Command(type=QUERY, level=1, description="Check if carousel rotation is permitted.") public void checkConditionsForRotation()
FcsHardwareExceptionRejectedCommandException - (RuntimeException)@Command(type=ACTION, level=1, description="Rotate carousel to a new absolute position.", timeout=60000) public void rotateToAbsolutePosition(int newPos)
newPos - @Command(type=ACTION, level=1, description="Rotate carousel to a relative position.", timeout=60000) public void rotateToRelativePosition(int relativePos, long timeout)
relativePos - relative position.timeout - @Command(type=ACTION, level=1, description="Move a socket which name is given as argument to STANDBY position.", alias="moveSocketToStandby", timeout=50000) public void rotateSocketToStandby(String socketName)
socketName - FcsHardwareExceptionpublic void checkDeltaPosition()
@Command(type=ACTION, level=1, description="Rotate carousel full turn. A number of turns can be given as argument.") public void rotateFullTurn(int nbTurn)
nbTurn - number of turns to rotate@Command(type=ACTION, level=1, description="To be executed when at the end of rotation, carousel positionexceeded position by more than standbyPosition + deltaPositionMax (value around 200).") public void recoveryRotationBackward()
@Command(type=ACTION, level=1, description="To be executed when at the end of rotation, carousel positionexceeded position by more than standbyPosition + deltaPositionMax (value around 200).") public void recoveryRotationForward()
@Command(type=ACTION, level=1, description="To be executed when at the end of rotation, carousel positionexceeded position by more than standbyPosition + deltaPositionMax (value around 200).") public void recoveryRotationStraight()
public boolean isActionCompleted(FcsEnumerations.MobileItemAction action)
isActionCompleted in class MobileItempublic void updateStateWithSensorsToCheckIfActionIsCompleted()
MobileItemupdateStateWithSensorsToCheckIfActionIsCompleted in class MobileItempublic void startAction(FcsEnumerations.MobileItemAction action)
startAction in class MobileItemaction - public void abortAction(FcsEnumerations.MobileItemAction action, long delay)
MobileItemabortAction in class MobileItempublic void endAction(FcsEnumerations.MobileItemAction action)
MobileItemendAction in class MobileItempublic void quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItempublic boolean isHoldingFilter()
isHoldingFilter in interface FilterHolderFcsHardwareExceptionpublic boolean isNotHoldingFilter()
FilterHolderisNotHoldingFilter in interface FilterHolderpublic boolean isAtHandoff()
FilterHolderisAtHandoff in interface FilterHolder@Command(type=QUERY, level=1, description="Return the ID of filter at STANDBY") public int getFilterID()
getFilterID in interface FilterHolder@Command(type=QUERY, level=1, description="Read sensors and update state", timeout=2000) public void updateStateWithSensors()
updateStateWithSensors in interface FilterHolderFcsHardwareExceptionpublic void updateMinLockedThreshold()
public long readLockSensorMinLocked()
public boolean isAtOnline()
isAtOnline in interface FilterHolder@Command(type=QUERY, level=1, description="Update socket at standby state from hyttc580 data.", timeout=2000) public void updateSocketAtStandbyWithSensors()
public void updateSocketAtStandbyState()
@Command(type=QUERY, level=1, description="Update state from hyttc580 data.", timeout=2000) public void updateState()
public void updateSocketNotAtStandby()
public FcsEnumerations.FilterClampState getClampsStateAtStandby()
public boolean isEmptyAtStandby()
public boolean isUnclampedOnFilterAtStandby()
public void updateTemperatures()
@Command(type=QUERY, level=1, description="Read on pt100 the temperatures", timeout=2000) public void readTemperatures()
@Command(type=ACTION, level=1, description="Activate POWER SAFE mode.", alias="activatePowerSafe") public void powerSafeActivate()
@Command(type=ACTION, level=1, description="Disactivate POWER SAFE mode.") public void powerSafeDisactivate()
Copyright © 2022 LSST. All rights reserved.