public class CarouselModule extends org.lsst.ccs.framework.Module implements Carousel
| Modifier and Type | Field and Description |
|---|---|
static String |
publishedByCarouselOutputName |
| Constructor and Description |
|---|
CarouselModule(String aName,
int aTickMillis,
Motor carouselMotor,
GenericLatch brake,
int nbSockets,
List<CarouselSocket> socketsList) |
| Modifier and Type | Method and Description |
|---|---|
static double |
addAngle(double angle1,
double angle2)
Add 2 angles : an angle is a double which value is between -360 and +360
|
void |
engageClampsContact()
After a rotation, when the carousel is stopped the power contact can be engaged
again.
|
Actuator |
getClampActuatorXminus() |
Actuator |
getClampActuatorXplus() |
FilterClampModule |
getClampXminus()
This method returns the clampX- which is at standby position.
|
FilterClampModule |
getClampXplus()
This method returns the clampX+ which is at standby position.
|
Filter |
getFilterAtStandby()
This methods return the filter which is in the socketAtStandby at standby position.
|
String |
getFilterInStandbyName() |
double |
getFilterPosition(Filter filter) |
int |
getNbSockets() |
double |
getPosition()
The carousel position measures the rotation angle of the carousel within
the fixed part of the camera.
|
CarouselSocket |
getSocketAtStandby()
This methods returns the socket at standby position or null if there is no
socket at standby position.
|
int |
getSocketNumber(Filter filter) |
CarouselSocket[] |
getSockets() |
double |
getStandbyPositionForFilter(Filter filter) |
ModuleState |
getState() |
StatusDataPublishedByCarousel |
getStatusData() |
String |
grabFilterAtStandby(Filter filter)
This method has to be executed when a filter has just been moved on the carousel
at standby position by the autochanger.
|
String |
grabFilterAtStandby(Object filterName) |
void |
initModule() |
boolean |
isAbleToMove()
The carousel can be locked by a break or prevented to move by the
autochanger fliprail.
|
boolean |
isHoldingFilterAtStandby() |
boolean |
isLocked() |
boolean |
isOnStandby(Filter filter) |
boolean |
isReadyToGrabAFilterAtStandby()
This method let us know if the carousel is ready to receive a filter at
standby position :
- the carousel must not rotate
- an empty socketAtStandby is at standby position.
|
boolean |
isRotating() |
String |
lock()
Lock the carousel (or engage the break).
|
protected String |
moveFilterToStandby(Filter filter)
This method rotates the carousel to put the given filter in front of the autochanger
(standby position).
|
void |
printSockets()
Print for every socket on carousel, the name of the filter it contains.
|
void |
processUpdate(Observable source,
org.lsst.ccs.framework.Module.ValueUpdate v)
What to do when the Modules we observe send there new values : we notify our own observers
|
String |
releaseClamps()
This is a command that can be sent to the carousel.
|
void |
releaseClampsContact()
Before rotating the carousel we have to release the power contact between the
moving part and the fixed part.
|
void |
removeFilterFromCarousel(Filter filter) |
String |
rotate(double angle)
Rotates carousel for an angle given as a parameter.
|
void |
setState(ModuleState state) |
String |
stop()
Stop the carousel if it is rotating.
|
void |
tick()
What has to be done for each tick of the timer.
|
String |
toString() |
void |
ungrabFilterAtStandby(Filter filter) |
String |
unlock()
Unlock the carousel (or disengage the break)
|
String |
unlockClamps() |
String |
unlockClamps(Filter filter)
This methods unlocks the 2 clamps at standby position, without Thread.sleep
|
void |
updateClampsStateWithSensors() |
void |
updateClampsStateWithSensorsFromPDO()
Read the clamps state from PDO : all the clamp sensors are read at one time.
|
void |
updateClampsStateWithSensorsFromSDO()
Deprecated.
|
alias, change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, publishData, publishData, publishData, publishData, publishData, publishData, publishData, register, removeLogPanicState, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setHandlerLevel, setLogLevel, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedpublic static final String publishedByCarouselOutputName
public CarouselModule(String aName, int aTickMillis, Motor carouselMotor, GenericLatch brake, int nbSockets, List<CarouselSocket> socketsList)
public CarouselSocket[] getSockets()
public double getPosition()
CarouselgetPosition in interface Carouselpublic ModuleState getState()
public void setState(ModuleState state)
public int getNbSockets()
public Actuator getClampActuatorXminus()
public Actuator getClampActuatorXplus()
public FilterClampModule getClampXminus()
public FilterClampModule getClampXplus()
public void initModule()
initModule in class org.lsst.ccs.framework.Modulepublic StatusDataPublishedByCarousel getStatusData()
public void processUpdate(Observable source, org.lsst.ccs.framework.Module.ValueUpdate v)
processUpdate in class org.lsst.ccs.framework.Modulepublic CarouselSocket getSocketAtStandby()
CarouselgetSocketAtStandby in interface Carouselpublic Filter getFilterAtStandby()
public String getFilterInStandbyName()
public boolean isReadyToGrabAFilterAtStandby()
throws HardwareException
HardwareExceptionpublic boolean isHoldingFilterAtStandby()
throws HardwareException
HardwareExceptionpublic boolean isRotating()
public boolean isAbleToMove()
CarouselisAbleToMove in interface Carouselpublic boolean isLocked()
public String stop()
Carouselpublic String lock()
Carouselpublic String unlock()
Carousel@Deprecated public void updateClampsStateWithSensorsFromSDO() throws org.lsst.ccs.bus.BadCommandException, HardwareException
org.lsst.ccs.bus.BadCommandExceptionHardwareErrorHardwareExceptionpublic void updateClampsStateWithSensorsFromPDO()
throws org.lsst.ccs.bus.BadCommandException,
HardwareException
org.lsst.ccs.bus.BadCommandExceptionHardwareErrorHardwareExceptionpublic void updateClampsStateWithSensors()
throws org.lsst.ccs.bus.BadCommandException,
HardwareException
org.lsst.ccs.bus.BadCommandExceptionHardwareExceptionpublic String rotate(double angle) throws IllegalArgumentException, org.lsst.ccs.bus.BadCommandException
rotate in interface CarouselangleEntered - : rotation angle
The rotation angle can be positive or negative.
It must be a double and have a value between -360.0 and 360.0IllegalArgumentException, - BadCommandExceptionIllegalArgumentException - if the angle given as parameter
is not in the ranges of available values.org.lsst.ccs.bus.BadCommandException - if the carousel is already rotating or is
unable to move.public void tick()
tick in class org.lsst.ccs.framework.Modulepublic void removeFilterFromCarousel(Filter filter) throws org.lsst.ccs.bus.BadCommandException, HardwareException, org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandExceptionHardwareExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic double getFilterPosition(Filter filter)
public double getStandbyPositionForFilter(Filter filter)
public int getSocketNumber(Filter filter)
filter - protected String moveFilterToStandby(Filter filter) throws InterruptedException, org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.BadCommandExceptionInterruptedExceptionpublic void printSockets()
public String grabFilterAtStandby(Object filterName) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionpublic String grabFilterAtStandby(Filter filter) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
filter - org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareErrorHardwareExceptionpublic void ungrabFilterAtStandby(Filter filter) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionpublic String releaseClamps() throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
CarouselreleaseClamps in interface Carouselorg.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareExceptionpublic String unlockClamps(Filter filter) throws org.lsst.ccs.bus.BadCommandException, org.lsst.ccs.bus.ErrorInCommandExecutionException, HardwareException
unlockClamps in interface Carouselfilter - org.lsst.ccs.bus.BadCommandExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionHardwareErrorHardwareExceptionpublic String unlockClamps() throws org.lsst.ccs.bus.BadCommandException, HardwareException, org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandExceptionHardwareExceptionorg.lsst.ccs.bus.ErrorInCommandExecutionExceptionpublic boolean isOnStandby(Filter filter)
public static double addAngle(double angle1,
double angle2)
angle1 - angle2 - public void releaseClampsContact()
CarouselreleaseClampsContact in interface Carouselpublic void engageClampsContact()
CarouselengageClampsContact in interface CarouselCopyright © 2013 LSST. All Rights Reserved.