public class Carousel extends MobileItem implements org.lsst.ccs.framework.HardwareController, 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 |
protected int |
deltaPosition
a difference between a target position and the actual position of the
carousel this is used to know if the rotation is completed or not.
|
int |
fastAcceleration |
int |
fastDeceleration |
int |
fastRotationTimeout |
int |
fastVelocity |
protected boolean |
homingDone |
protected int |
position
carousel position given by carouselControl.
|
protected int |
readCurrent |
protected int |
readVelocity |
int |
recoveryLockingCurrent |
int |
recoveryMaxVelocity |
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 BridgeToHardware |
tcpProxy |
protected int |
timeToPrepareUnlock |
long |
timeToUpdateProtectionSystem |
agentStateService, beginTime, commandDuration, currentAction, dataProviderDictionaryService, FCSLOG, hasToWaitForEndOfAction, lock, 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 name of filter which is in the socket at STANDBY position or
NO_FILTER if there is no filter at STANDBY.
|
CarouselSocket |
getFilterSocket(int filterID) |
int |
getFullTurn()
used by tests.
|
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 |
homing()
homing of rotation controller to be done before each rotation
|
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 |
isHomingDone() |
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 |
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 |
publishData()
Publish Data on status bus for trending data base and GUIs.
|
void |
quickStopAction(FcsEnumerations.MobileItemAction action,
long delay) |
void |
readAndUpdateOutputInterlocks()
Read on hyttc580 by SDO the outputs to autochanger interlocks and update
output signals CS, CFC, CF0, CF1.
|
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 |
releaseClamps()
Release clamps at standby position to get ready to clamp again.
|
void |
releaseClampsContact() |
void |
rotateFullTurn(double 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 |
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 |
waitForProtectionSystemUpdate() |
void |
waitForStateUnclampedOnFilter(long timeout)
wait until carousel is unclamped and empty at standby
|
cancelReadingSensors, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, readSensorsUntilActionIsCompleted, shutdown, signal, waitForEndOfActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckHardware, checkStoppedclearAlarm, getAlertSeparator, getAlertService, getSubsystem, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarmOnlyIfNew, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyEveryTenMinutes, raiseAlertOnlyIfNew, raiseWarning, raiseWarning, raiseWarningOnlyEveryTenMinutes, raiseWarningOnlyIfNewprotected int position
protected int absoluteTargetPosition
@ConfigurationParameter(description="Difference between target position and actual position. This is used to know if the rotation is completed.",
units="Carousel encoder steps",
range="0..2181120",
category="carousel")
protected volatile int deltaPosition
protected int readVelocity
protected int readCurrent
@ConfigurationParameter(description="velocity in slow mode",
units="Carousel velocity unit",
range="0..5000",
category="carousel")
public volatile int slowVelocity
@ConfigurationParameter(description="acceleration in slow mode",
units="Carousel acceleration unit",
range="0..5000",
category="carousel")
public volatile int slowAcceleration
@ConfigurationParameter(description="deceleration in slow mode",
units="Carousel acceleration unit",
range="0..5000",
category="carousel")
public volatile int slowDeceleration
@ConfigurationParameter(description="in milliseconds; timeout for the rotation in slow mode",
units="milliseconds",
range="0..300000",
category="carousel")
public volatile int slowRotationTimeout
@ConfigurationParameter(description="velocity in fast mode",
units="Carousel velocity unit",
range="0..5000",
category="carousel")
public volatile int fastVelocity
@ConfigurationParameter(description="acceleration in fast mode",
units="Carousel acceleration unit",
range="0..5000",
category="carousel")
public volatile int fastAcceleration
@ConfigurationParameter(description="deceleration in fast mode",
units="Carousel acceleration unit",
range="0..5000",
category="carousel")
public volatile int fastDeceleration
@ConfigurationParameter(description="in milliseconds; timeout for the rotation in fast mode",
units="milliseconds",
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="milliseconds",
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="milliseconds",
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.",
units="rpm",
range="0..100",
category="carousel")
public volatile int recoveryMaxVelocity
@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=SIBLINGS,
pathFilter="tcpProxy")
protected BridgeToHardware tcpProxy
protected boolean clampsStateInitialized
protected boolean homingDone
protected CarouselSocket socketAtStandby
public void build()
build in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
level=0,
description="Return true if clamp state is initialized for all clamps.")
public boolean isClampsStateInitialized()
@Command(type=QUERY,
level=0,
description="Return true if carouselController homing is done.")
public boolean isHomingDone()
public int getCurrentToPrepareUnlock()
public int getTimeToPrepareUnlock()
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")
public int getSocketAtStandbyID()
@Command(type=QUERY,
level=0,
description="Returns name of filter at STANDBY position or NO_FILTER if there is no filter at STANDBY.")
public String getFilterAtStandbyName()
@Command(type=QUERY,
level=0,
description="Returns id of filter at STANDBY position or NO_FILTER 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=1,
description="CarouselHoming")
public void homing()
@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 - 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(double nbTurn)
nbTurn - number of turns to rotatepublic 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 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()
@Command(type=QUERY,
level=1,
description="Read on hyttc580 by SDO the outputs to autochanger interlocks CS, CFC, CF0, CF1.",
timeout=2000)
public void readAndUpdateOutputInterlocks()
@Command(type=QUERY,
level=1,
description="Read on pt100 the temperatures",
timeout=2000)
public void readTemperatures()
Copyright © 2021 LSST. All rights reserved.