org.lsst.ccs.subsystems.shutter.driver
Class BladeSetDrvr

java.lang.Object
  extended by org.lsst.ccs.subsystems.shutter.driver.BladeSetDrvr
All Implemented Interfaces:
BladeSet

public class BladeSetDrvr
extends Object
implements BladeSet

Routines to perform shutter blade operations

Author:
Owen Saxton

Nested Class Summary
static class BladeSetDrvr.Hall
          Inner class to hold a set of raw Hall sensor data
static class BladeSetDrvr.HallItem
          Inner class to hold an item of raw Hall sensor data
static class BladeSetDrvr.SampData
          Inner class to hold a set of special move data samples
static class BladeSetDrvr.Sample
          Inner class to hold an item of sampled data
 
Field Summary
static int HOM_OPT_NDIRN
          Public constants
static int HOM_OPT_PFINAL
          Public constants
static int MOV_TYP_SCURVE
          Public constants
static int MOV_TYP_TRAP
          Public constants
static float TORQUE_LIM
           
 
Constructor Summary
BladeSetDrvr()
           
 
Method Summary
 void addHallSensorListener(HallSensorListener l)
          Adds a Hall sensor listener
 void addMovementHistoryListener(MovementHistoryListener l)
          Adds a movement history listener
 BladeSetCalibration calibNew(float dist, float time)
          Calibrates the Hall switch positions (new test)
 BladeSetCalibration calibrate(float dist, float step, float time)
          Calibrates the Hall switch positions, moving in both directions
 void disableDrive()
          Disables the drive
 void enableDrive()
          Enables the drive
 org.lsst.ccs.drivers.iocard.AccesDio getAcces()
          Returns the AccesDio object being used
 float getAmbientTemperature()
          Gets the ambient temperature
 BladeSetConfiguration getBladeSetConfiguration()
          Returns the configuration object being used
 BladeSetCalibration getCalib()
          Gets the Hall calibration data
 org.lsst.ccs.drivers.parker.AcrComm getComm()
          Returns the motor communications object being used
 BladeSetConfiguration getConfig()
          Returns the configuration object being used
 float getCurrentPosition()
          Returns the current blade set relative (i.e.
 float getDriveTemperature()
          Gets the drive temperature
 org.lsst.ccs.drivers.iocard.Helios getHelios()
          Returns the Helios object being used
 int getIndex()
          Gets the blade set index
 float getPosition()
          Gets the current blade set position as a distance
 int home(int optns, float vel)
          Homes the shutter
 int move(int type, float dist, float time, float mvFract)
          Performs a move
 BladeSetDrvr.SampData moveD(int type, float dist, float time, float mvFract, int nSamp, int[] iParms, int[] fParms)
          Performs a move, recording various parameters periodically
 MovementHistory moveH(int type, float dist, float time, float mvFract, int nSamp)
          Performs a move, recording both Hall switch transitions and periodic encoder values
 MovementHistory moveP(int type, float dist, float time, float mvFract, int nSamp)
          Performs a move, sampling the position periodically
 int moveStatus()
          Gets the status of a move: normal; or premature stop reason
 void moveToPosition(float relPosition, float time)
          Moves the blade set to a given relative (i.e.
 void removeHallSensorListener(HallSensorListener l)
          Removes a Hall sensor listener
 void removeMovementHistoryListener(MovementHistoryListener l)
          Removes a movement history listener
 void setCalib(BladeSetCalibration list)
          Sets the Hall calibration data
 void setDriveOff()
          Turns the drive off
 void setDriveOn()
          Turns the drive on and leaves it on
 void setIndex(int index)
          Sets the blade set index, and hence its configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOV_TYP_SCURVE

public static final int MOV_TYP_SCURVE
Public constants

See Also:
Constant Field Values

MOV_TYP_TRAP

public static final int MOV_TYP_TRAP
Public constants

See Also:
Constant Field Values

HOM_OPT_NDIRN

public static final int HOM_OPT_NDIRN
Public constants

See Also:
Constant Field Values

HOM_OPT_PFINAL

public static final int HOM_OPT_PFINAL
Public constants

See Also:
Constant Field Values

TORQUE_LIM

public static final float TORQUE_LIM
See Also:
Constant Field Values
Constructor Detail

BladeSetDrvr

public BladeSetDrvr()
Method Detail

setIndex

public void setIndex(int index)
Sets the blade set index, and hence its configuration

Specified by:
setIndex in interface BladeSet

getIndex

public int getIndex()
Gets the blade set index

Specified by:
getIndex in interface BladeSet

moveToPosition

public void moveToPosition(float relPosition,
                           float time)
Moves the blade set to a given relative (i.e. fractional) position

Specified by:
moveToPosition in interface BladeSet
Parameters:
relPosition - Position of the leading blade to move to. This is a number [0,1] where 0 means fully open and 1 is fully closed.
time - How long it should take in seconds reach the position.

getCurrentPosition

public float getCurrentPosition()
Returns the current blade set relative (i.e. fractional) position

Specified by:
getCurrentPosition in interface BladeSet
Returns:
The current position of the BladeSet, a number in the fuzzy range [0,1].

getBladeSetConfiguration

public BladeSetConfiguration getBladeSetConfiguration()
Returns the configuration object being used

Specified by:
getBladeSetConfiguration in interface BladeSet
Returns:
The BladeSet configuration.

addMovementHistoryListener

public void addMovementHistoryListener(MovementHistoryListener l)
Adds a movement history listener

Specified by:
addMovementHistoryListener in interface BladeSet

removeMovementHistoryListener

public void removeMovementHistoryListener(MovementHistoryListener l)
Removes a movement history listener

Specified by:
removeMovementHistoryListener in interface BladeSet

addHallSensorListener

public void addHallSensorListener(HallSensorListener l)
Adds a Hall sensor listener

Specified by:
addHallSensorListener in interface BladeSet

removeHallSensorListener

public void removeHallSensorListener(HallSensorListener l)
Removes a Hall sensor listener

Specified by:
removeHallSensorListener in interface BladeSet

getPosition

public float getPosition()
Gets the current blade set position as a distance


setDriveOn

public void setDriveOn()
Turns the drive on and leaves it on


setDriveOff

public void setDriveOff()
Turns the drive off


enableDrive

public void enableDrive()
Enables the drive


disableDrive

public void disableDrive()
Disables the drive


calibrate

public BladeSetCalibration calibrate(float dist,
                                     float step,
                                     float time)
Calibrates the Hall switch positions, moving in both directions


calibNew

public BladeSetCalibration calibNew(float dist,
                                    float time)
Calibrates the Hall switch positions (new test)


setCalib

public void setCalib(BladeSetCalibration list)
Sets the Hall calibration data


getCalib

public BladeSetCalibration getCalib()
Gets the Hall calibration data


move

public int move(int type,
                float dist,
                float time,
                float mvFract)
Performs a move


moveD

public BladeSetDrvr.SampData moveD(int type,
                                   float dist,
                                   float time,
                                   float mvFract,
                                   int nSamp,
                                   int[] iParms,
                                   int[] fParms)
Performs a move, recording various parameters periodically


moveH

public MovementHistory moveH(int type,
                             float dist,
                             float time,
                             float mvFract,
                             int nSamp)
Performs a move, recording both Hall switch transitions and periodic encoder values


moveP

public MovementHistory moveP(int type,
                             float dist,
                             float time,
                             float mvFract,
                             int nSamp)
Performs a move, sampling the position periodically


home

public int home(int optns,
                float vel)
Homes the shutter


getConfig

public BladeSetConfiguration getConfig()
Returns the configuration object being used


getAcces

public org.lsst.ccs.drivers.iocard.AccesDio getAcces()
Returns the AccesDio object being used


getHelios

public org.lsst.ccs.drivers.iocard.Helios getHelios()
Returns the Helios object being used


getComm

public org.lsst.ccs.drivers.parker.AcrComm getComm()
Returns the motor communications object being used


moveStatus

public int moveStatus()
Gets the status of a move: normal; or premature stop reason


getDriveTemperature

public float getDriveTemperature()
Gets the drive temperature


getAmbientTemperature

public float getAmbientTemperature()
Gets the ambient temperature



Copyright © 2013 LSST. All Rights Reserved.