public class Carousel extends MobileItem implements org.lsst.ccs.framework.HardwareController, FilterHolder
| Modifier and Type | Field and Description |
|---|---|
protected PieceOfHardware |
ai814 |
int |
encoderSign |
protected Map<String,CarouselSocket> |
socketsMap
A map to store the sockets by their names.
|
currentAction, FCSLOG, hasToWaitForEndOfAction, lock, name, s, scheduleralertSeparater| Constructor and Description |
|---|
Carousel() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortAction(FcsEnumerations.MobileItemAction action,
long delay)
aborts action actually running.
|
void |
checkConditionsForRotation()
Check if carousel rotation is permitted.
|
void |
checkSensorTypeIncremental() |
void |
checkStarted()
CheckStarted is executed by completeInitialization when a first start has
failed.
|
int |
computeNewPosition(int pos) |
int |
computeShortestRelativePosition(int d) |
StatusDataPublishedByCarousel |
createStatusDataPublishedByCarousel()
Create an object StatusDataPublishedByCarousel to be published on the
STATUS bus.
|
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 |
getEncoderSign() |
Filter |
getFilterAtStandby()
This methods return the filter which is in the socketAtStandby at standby
filterPosition.
|
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 |
getPosition()
return carousel position.
|
CarouselSocket |
getSocketAtStandby()
Return the socket HALTED at STANDBY filterPosition if there is one.
|
CarouselSocket |
getSocketByName(String socketName)
Return a CarouselSocket which name is given as parameter.
|
int |
getStepNB() |
String |
grabFilterAtStandby(Filter filter)
This method has to be executed when a filter has just been moved on the
carousel at standby filterPosition by the autochanger.
|
String |
grabFilterAtStandby(String filterName)
Grab a filter at STANDBY position.
|
void |
homing()
to be done before each rotation
|
void |
init()
*** lifecycle methods *************************************************
|
boolean |
isActionCompleted(FcsEnumerations.MobileItemAction action) |
boolean |
isAtHandoff()
This method returns true if the autochanger trucks are at HANDOFF position, false otherwise.
|
boolean |
isAtStandby()
Used to publish on the STATUS bus for the GUI.
|
boolean |
isAtStandby(Filter filter)
Return true if the filter given as argument is at STANDBY position.
|
boolean |
isAutochangerHoldingFilter()
This methods returns true if the autochanger is holding a filter at
STANDBY position.
|
boolean |
isHoldingFilter()
Return true if carousel is holding a filter at STANDBY position.
|
boolean |
isHoldingFilterAtStandby() |
boolean |
isHomingDone() |
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 |
myDevicesReady()
Return True if all CAN open devices useful for this MobileItemMobile are ready for an action.
|
void |
postAction(FcsEnumerations.MobileItemAction action) |
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 |
releaseClamps()
Release clamps at standby position to get ready to clamp again.
|
void |
releaseClampsContact() |
void |
rotateEmptySocketAtStandby()
Move an empty socket to STANDBY position.
|
void |
rotateSocketToStandby(String socketName)
Rotate carousel to move a socket which name is given as argument to
STANDBY position.
|
void |
rotateToRelativePosition(int relativePosition)
A command to rotate carousel.
|
void |
startAction(FcsEnumerations.MobileItemAction action)
Starts action ROTATE_CAROUSEL_TO_ABSOLUTE_POSITION or
ROTATE_CAROUSEL_TO_RELATIVE_POSITION.
|
String |
toString() |
void |
ungrabFilterAtStandby(String filterName)
This unlock clamps at STANDBY.
|
void |
unlockClamps()
Unlocks the clamps at STANDBY.
|
void |
updateClampsStateWithSensors()
Read the clamps state from PDO : all the clamp sensors are read at one
time.
|
void |
updateClampsStateWithSensorsFromPDO()
Read the clamps state from PDO : all the clamp sensors are read at one
time.
|
void |
updateClampsStateWithSensorsFromSDO()
Read the clamp sensors one by one with RSDO command
|
void |
updateCurrent()
Updates the field current in reading the CPU of the controller.
|
void |
updatePosition()
Updates the filterPosition of the carousel in reading the CPU of the
controller.
|
void |
updateStateWithSensors()
This method read values sent by the sensors and update state from this new values.
|
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.
|
abort, abort, checkReadyForAction, checkStopped, executeAction, getAlertService, getHaltRequired, getName, getSubsystem, isMoving, quickstop, readSensorsUntilActionIsCompleted, shutdownNow, signal, stop, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckHardware, checkStoppedclearAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarning, raiseWarning, raiseWarning@ConfigurationParameter(description="if encoderSign = 1, encoder goes from 0 to stepNB,if encoderSign = -1, encoder goes from 0 to stepNB") public int encoderSign
@LookupField(strategy=BYNAME) protected PieceOfHardware ai814
@LookupField(strategy=CHILDREN) protected final Map<String,CarouselSocket> socketsMap
public void init()
init in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
level=0,
description="Return true if carouselController homing is done.")
public boolean isHomingDone()
public int getStepNB()
public int getEncoderSign()
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()
public Filter getFilterAtStandby()
@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="Return true if Autochanger is holding filter at STANDBY.")
public boolean isAutochangerHoldingFilter()
FcsHardwareExceptionpublic void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecyclepublic void checkStarted()
checkStarted in interface org.lsst.ccs.framework.HardwareController@Command(type=ACTION,
level=1,
description="CarouselHoming")
public void homing()
public void checkSensorTypeIncremental()
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 true if carousel is rotating.")
public boolean isRotating()
@Command(type=ACTION,
level=1,
description="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 updateClampsStateWithSensorsFromSDO()
FcsHardwareExceptionpublic void updateClampsStateWithSensorsFromPDO()
FcsHardwareExceptionpublic void updateClampsStateWithSensors()
FcsHardwareExceptionpublic String grabFilterAtStandby(String filterName)
filterName - FcsHardwareExceptionpublic String grabFilterAtStandby(Filter filter)
filter - FcsHardwareExceptionpublic void ungrabFilterAtStandby(String filterName)
filterName - FcsHardwareException@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()
public boolean isAtStandby(Filter filter)
filter - 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 relative position.",
timeout=60000)
public void rotateToRelativePosition(int relativePosition)
relativePosition - FcsHardwareException@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 rotateEmptySocketAtStandby()
FcsHardwareExceptionpublic 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 quickStopAction(FcsEnumerations.MobileItemAction action, long delay)
quickStopAction in class MobileItempublic void postAction(FcsEnumerations.MobileItemAction action)
postAction in class MobileItem@Command(type=ACTION,
level=1,
description="compute new position to take in account tours which can have been runned")
public int computeNewPosition(int pos)
pos - @Command(type=ACTION,
level=1,
description="Compute relative position to find the shortest way to run carousel.")
public int computeShortestRelativePosition(int d)
public boolean isHoldingFilter()
isHoldingFilter in interface FilterHolderFcsHardwareExceptionpublic boolean isAtHandoff()
FilterHolderisAtHandoff in interface FilterHolderpublic void updateStateWithSensors()
FilterHolderupdateStateWithSensors in interface FilterHolderCopyright © 2017 LSST. All rights reserved.