org.lsst.ccs.subsystems.fcs
Class AutoChangerModule

java.lang.Object
  extended by java.util.Observable
      extended by org.lsst.ccs.framework.Module
          extended by org.lsst.ccs.subsystems.fcs.BasicAutoChangerModule
              extended by org.lsst.ccs.subsystems.fcs.AutoChangerModule
All Implemented Interfaces:
Serializable, Observer, org.lsst.ccs.framework.Configurable, AutoChanger

public class AutoChangerModule
extends BasicAutoChangerModule

This class will be used with the final hardware in which we have a fliprail and a clamp online to hold the filter at online position. It's not used for Single FIlter Test.

Author:
virieux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.lsst.ccs.framework.Module
org.lsst.ccs.framework.Module.ValueUpdate
 
Nested classes/interfaces inherited from interface org.lsst.ccs.framework.Configurable
org.lsst.ccs.framework.Configurable.Environment
 
Field Summary
 
Fields inherited from class org.lsst.ccs.subsystems.fcs.BasicAutoChangerModule
carousel, closingLatches, latchesState, openingLatches, publishedByAutoChangerOutputName, state, truckXminus, truckXplus, updatingLatches
 
Fields inherited from class org.lsst.ccs.framework.Module
environment, log, name, nObserverThreads, registry, tickMillis
 
Constructor Summary
AutoChangerModule()
           
 
Method Summary
 String closeFliprail()
           
 String closeOnlineClamp()
          when a filter is at online position it is locked by a clamp.
 Filter getFilterOnline()
           
 String getFilterOnlineName()
           
 FlipRailModule getFliprail()
           
 FlipRailState getFlipRailState()
           
 Motor getMotor()
           
 FilterLatch getOnlineClamp()
           
 StatusDataPublishedByAutoChanger getStatusData()
           
 double getTrucksPosition()
           
 double getTrucksPositionAtStandby()
           
 double getTrucksPositionOnline()
           
 double getTrucksPositionSwapout()
           
 String goToPosition(double requiredPosition)
          This method moves the autochanger trucks to a position given as a parameter.
 String goToStandback()
           
 String goToStandby()
           
 void initModule()
           
 boolean isAtStandby()
           
 boolean isMoving()
           
 boolean isMovingToStandback()
           
 boolean isMovingToStandby()
           
 void locateTrucks()
          This method has to be executed at the FCS startup.
 String moveFilterToOnline(Filter aFilter)
           
 String moveFilterToStandback(Filter aFilter)
           
 String moveFilterToStandby(Filter aFilter)
           
 String openFliprail()
           
 String openOnlineClamp()
          when a filter is at online position it is locked by a clamp.
 void publishDataAndNotifyObservers()
           
 void setFliprail(FlipRailModule fliprail)
           
 void setMotor(Motor motor)
           
 void setOnlineClamp(FilterLatch onlineClamp)
           
 void setTrucksPositionAtStandby(double trucksPositionAtStandby)
           
 void setTrucksPositionOnline(double trucksPositionOnline)
           
 void setTrucksPositionSwapout(double trucksPositionSwapout)
           
 String stop()
           
 void updateStateWithSensors()
           
 
Methods inherited from class org.lsst.ccs.subsystems.fcs.BasicAutoChangerModule
checkPreConditionsForMotion, closeLatchesAtStandby, getFilterOnTrucks, getFilterOnTrucksName, getFilterSensorsDIO, getFilterSensorsDIOName, getLatchXminus, getLatchXplus, getRailsSensorsDIO, getRailsSensorsDIOName, getState, getTrucksLocation, getTruckXminus, getTruckXplus, grabFilterAtStandby, isAtStandback, isHoldingFilterAtStandby, isTrucksEmpty, openLatchesAtStandby, processUpdate, setFilterOnTrucks, setFilterSensorsDIO, setFilterSensorsDIOName, setLatchXminus, setLatchXplus, setRailsSensorsDIO, setRailsSensorsDIOName, setState, setTrucksEmpty, setTruckXminus, setTruckXplus, toString, ungrabFilterAtStandby, updateLatchesStateWithSensors, updateTrucksLocationWithSensors
 
Methods inherited from class org.lsst.ccs.framework.Module
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, tick, update
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoChangerModule

public AutoChangerModule()
Method Detail

initModule

public void initModule()
Overrides:
initModule in class BasicAutoChangerModule

getStatusData

public StatusDataPublishedByAutoChanger getStatusData()
Overrides:
getStatusData in class BasicAutoChangerModule

closeOnlineClamp

public String closeOnlineClamp()
                        throws org.lsst.ccs.bus.ErrorInCommandExecutionException
when a filter is at online position it is locked by a clamp. when the clamp is closed, the filter is hold at online position.

Throws:
org.lsst.ccs.bus.ErrorInCommandExecutionException

openOnlineClamp

public String openOnlineClamp()
                       throws org.lsst.ccs.bus.ErrorInCommandExecutionException
when a filter is at online position it is locked by a clamp. when the clamp is open, the filter is not hold at online position, so the autochanger can move the filter back to standby position.

Throws:
org.lsst.ccs.bus.ErrorInCommandExecutionException

openFliprail

public String openFliprail()
                    throws org.lsst.ccs.bus.ErrorInCommandExecutionException,
                           org.lsst.ccs.bus.BadCommandException
Throws:
org.lsst.ccs.bus.ErrorInCommandExecutionException
org.lsst.ccs.bus.BadCommandException

closeFliprail

public String closeFliprail()
                     throws org.lsst.ccs.bus.ErrorInCommandExecutionException
Throws:
org.lsst.ccs.bus.ErrorInCommandExecutionException

getOnlineClamp

public FilterLatch getOnlineClamp()

setOnlineClamp

public void setOnlineClamp(FilterLatch onlineClamp)

getFliprail

public FlipRailModule getFliprail()

getFlipRailState

public FlipRailState getFlipRailState()

setFliprail

public void setFliprail(FlipRailModule fliprail)
Parameters:
fliprail - the fliprail to set

publishDataAndNotifyObservers

public void publishDataAndNotifyObservers()
Overrides:
publishDataAndNotifyObservers in class BasicAutoChangerModule

goToPosition

public String goToPosition(double requiredPosition)
                    throws IllegalArgumentException,
                           org.lsst.ccs.bus.BadCommandException
This method moves the autochanger trucks to a position given as a parameter.

Parameters:
requiredPosition - the position the trucks will have at the end of the execution this method if every thing works fine. It implies the autochanger motor.
Returns:
Throws:
IllegalArgumentException
org.lsst.ccs.bus.BadCommandException

stop

public String stop()

moveFilterToOnline

public String moveFilterToOnline(Filter aFilter)
                          throws org.lsst.ccs.bus.BadCommandException,
                                 org.lsst.ccs.bus.ErrorInCommandExecutionException
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

moveFilterToStandby

public String moveFilterToStandby(Filter aFilter)
                           throws org.lsst.ccs.bus.BadCommandException,
                                  org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
moveFilterToStandby in interface AutoChanger
Specified by:
moveFilterToStandby in class BasicAutoChangerModule
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

getFilterOnline

public Filter getFilterOnline()

getFilterOnlineName

public String getFilterOnlineName()

getTrucksPosition

public double getTrucksPosition()

getTrucksPositionAtStandby

public double getTrucksPositionAtStandby()

getTrucksPositionOnline

public double getTrucksPositionOnline()

getTrucksPositionSwapout

public double getTrucksPositionSwapout()

locateTrucks

public void locateTrucks()
This method has to be executed at the FCS startup. It checks the hardware trucks and set the trucks position.


setTrucksPositionAtStandby

public void setTrucksPositionAtStandby(double trucksPositionAtStandby)

setTrucksPositionOnline

public void setTrucksPositionOnline(double trucksPositionOnline)

setTrucksPositionSwapout

public void setTrucksPositionSwapout(double trucksPositionSwapout)

getMotor

public Motor getMotor()

setMotor

public void setMotor(Motor motor)

isMoving

public boolean isMoving()
Specified by:
isMoving in class BasicAutoChangerModule

isAtStandby

public boolean isAtStandby()
Specified by:
isAtStandby in interface AutoChanger
Overrides:
isAtStandby in class BasicAutoChangerModule
Returns:
true if the trucks are at standby position, otherwise false

goToStandback

public String goToStandback()
                     throws org.lsst.ccs.bus.BadCommandException,
                            org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
goToStandback in class BasicAutoChangerModule
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

goToStandby

public String goToStandby()
                   throws org.lsst.ccs.bus.BadCommandException
Specified by:
goToStandby in class BasicAutoChangerModule
Throws:
org.lsst.ccs.bus.BadCommandException

moveFilterToStandback

public String moveFilterToStandback(Filter aFilter)
                             throws org.lsst.ccs.bus.BadCommandException,
                                    org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
moveFilterToStandback in class BasicAutoChangerModule
Throws:
org.lsst.ccs.bus.BadCommandException
org.lsst.ccs.bus.ErrorInCommandExecutionException

isMovingToStandback

public boolean isMovingToStandback()
Specified by:
isMovingToStandback in class BasicAutoChangerModule

isMovingToStandby

public boolean isMovingToStandby()
Specified by:
isMovingToStandby in class BasicAutoChangerModule

updateStateWithSensors

public void updateStateWithSensors()
                            throws HardwareError,
                                   org.lsst.ccs.bus.ErrorInCommandExecutionException
Specified by:
updateStateWithSensors in class BasicAutoChangerModule
Throws:
HardwareError
org.lsst.ccs.bus.ErrorInCommandExecutionException


Copyright © 2013 LSST. All Rights Reserved.