
public final class BladeSetDrvr extends Object implements BladeSet
Definitely NOT thread-safe because any method might manipulate the hardware. Use should be confined to a single thread, or at least one at a time.
| Modifier and Type | Class and Description |
|---|---|
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 Sample instances along with some
general info about the move.
|
static class |
BladeSetDrvr.Sample
Inner class to hold an item of sampled data from the motor controller.
|
| Constructor and Description |
|---|
BladeSetDrvr(ShutterSide side,
BladeSetConfiguration bsetConfig,
ShutterConfiguration shutterConfig,
List<HallConfiguration> hallConfigs,
org.lsst.ccs.drivers.parker.AcrComm acr,
org.lsst.ccs.drivers.iocard.AccesDio dio)
Saves the side of the camera X axis to which the blade set belongs,
save configuration info and hardware control objects.
|
| Modifier and Type | Method and Description |
|---|---|
double |
absoluteToEncoder(double absolute)
The inverse of
BladeSet.encoderToAbsolute(double). |
double |
absoluteToRelative(double absolute)
Converts an absolute position along the camera X axis to a relative
blade set position in the range [0.0, 1.0], where 0.0 means fully retracted
(open) and 1.0 means fully extended (closed).
|
void |
disableDrive()
Turns off the motor drive current.
|
void |
enableDrive()
Turns on the motor drive current.
|
double |
encoderToAbsolute(double encoderValue)
Converts a motor position encoder value to an absolute position in mm of the leading
edge of the blade set on the camera X axis.
|
double |
getAbsolutePosition()
Gets the current absolute position in mm.
|
org.lsst.ccs.drivers.parker.AxisName |
getAxis()
Gets the axis controlled by this object.
|
BladeSetConfiguration |
getBladeSetConfiguration()
Gets the configuration of the BladeSet.
|
org.lsst.ccs.drivers.parker.AcrComm |
getComm()
Gets the motor communications object being used.
|
BladeSetConfiguration |
getConfig()
Gets the configuration object being used.
|
org.lsst.ccs.drivers.iocard.AccesDio |
getDio()
Gets the AccesDio object being used.
|
double |
getDriveTemperature()
Gets the drive temperature.
|
org.lsst.ccs.drivers.parker.EncoderName |
getEncoder()
Gets the encoder our axis uses for motor position feedback.
|
int |
getMoveStatus()
Gets the status of the last move from the motor controller: normal
or premature stop reason.
|
double |
getRelativePosition()
Gets the current position of the BladeSet.
|
ShutterSide |
getSide()
Gets the side of the shutter to which the blade set belongs.
|
boolean |
isFullyExtended()
Is the blade set fully extended? That is, is its absolute position within the
shutter tolerance of the closed position?
|
boolean |
isFullyRetracted()
Is the blade set fully retracted? That is, is its absolute position within the
shutter tolerance of the open position?
|
int |
move(int type,
double dist,
double time)
Performs a simple move without enabling Hall transition interrupts
or motor controller parameter sampling.
|
BladeSetDrvr.SampData |
moveD(int type,
double dist,
double time,
int nSamp,
int[] iParms,
int[] fParms)
Performs a move accompanied by parameter sampling in the motor controller.
|
MovementHistory |
moveP(int type,
double dist,
double time,
int nSamp)
Performs a move using the standard motion program, recording
periodic data samples in the motor controller.
|
MovementHistory |
moveToPosition(double relPosition,
double time)
Moves the blade set to a given relative (i.e.
|
double |
relativeToAbsolute(double relative)
The inverse of
BladeSet.absoluteToRelative(double). |
public BladeSetDrvr(ShutterSide side, BladeSetConfiguration bsetConfig, ShutterConfiguration shutterConfig, List<HallConfiguration> hallConfigs, org.lsst.ccs.drivers.parker.AcrComm acr, org.lsst.ccs.drivers.iocard.AccesDio dio)
side - the side.bsetConfig - the blade set-specific configuration.shutterConfig - configuration info for the shutter in general.hallConfigs - the list of Hall configurations, one per sensor.acr - the object used to communicate with the ACR controller.dio - the interface to the digital I/O card.public ShutterSide getSide()
BladeSetpublic MovementHistory moveToPosition(double relPosition, double time)
moveToPosition in interface BladeSetrelPosition - the target relative positiontime - the duration of the motion in secondspublic double getRelativePosition()
BladeSetgetRelativePosition in interface BladeSetBladePositionpublic BladeSetConfiguration getBladeSetConfiguration()
BladeSetgetBladeSetConfiguration in interface BladeSetpublic double getAbsolutePosition()
public void enableDrive()
public void disableDrive()
public int move(int type,
double dist,
double time)
type - the move type, MOV_TYP_SCURVE or MOV_TYP_TRAPdist - the signed distance to move (change of absolute position in mm)time - the duration of the move in secondsMovementStatus)public BladeSetDrvr.SampData moveD(int type, double dist, double time, int nSamp, int[] iParms, int[] fParms)
type - see #move(int, double, double, double)dist - see #move(int, double, double, double)time - see #move(int, double, double, double)nSamp - the number of times to perform samplingiParms - the ID numbers of the integer parameters to record at each samplingfParms - the ID numbers of the float parameters to record at each samplingpublic MovementHistory moveP(int type, double dist, double time, int nSamp)
type - see #move(int, double, double, double)dist - see #move(int, double, double, double)time - see #move(int, double, double, double)nSamp - the number of times to perform samplingpublic BladeSetConfiguration getConfig()
public org.lsst.ccs.drivers.parker.AxisName getAxis()
public org.lsst.ccs.drivers.parker.EncoderName getEncoder()
public org.lsst.ccs.drivers.iocard.AccesDio getDio()
public org.lsst.ccs.drivers.parker.AcrComm getComm()
public int getMoveStatus()
MovementStatuspublic double getDriveTemperature()
public double encoderToAbsolute(double encoderValue)
position = (encoderValue - offset) / countsPerMm,
where offset is the value the encoder has at absolute position == 0.0 and
countsPerMm is the number of encoder counts per mm, which will be negative
if the the direction of increasing encoder values is the direction of decreasing
absolute position.encoderToAbsolute in interface BladeSetencoderValue - the value read from the encoder.public double absoluteToEncoder(double absolute)
BladeSet.encoderToAbsolute(double).absoluteToEncoder in interface BladeSetabsolute - the absolute position.public double absoluteToRelative(double absolute)
relative = (absolute - absoluteOpen) / (absoluteClosed - absoluteOpen).absoluteToRelative in interface BladeSetabsolute - the absolute position.BladeSetConfigurationpublic double relativeToAbsolute(double relative)
BladeSet.absoluteToRelative(double).relativeToAbsolute in interface BladeSetrelative - the relative position.BladeSetConfigurationpublic boolean isFullyExtended()
isFullyExtended in interface BladeSetShutterConfiguration,
BladeSetConfigurationpublic boolean isFullyRetracted()
isFullyRetracted in interface BladeSetShutterConfiguration,
BladeSetConfigurationCopyright © 2016 LSST. All rights reserved.