Package gda.device.motor
Interface ShutteredMotorController
- All Superinterfaces:
Configurable,Device,Findable,gda.observable.IObservable
- All Known Implementing Classes:
ShutteredScannableMotor
Interface to a shuttered motor controller that will calculate the start and end positions
of a move based on the desired time-to-velocity, desired velocity, and fudge factors added
to make sure that the motors are up to speed. Assumes that the shutter will be triggered open slightly before
openPosition and triggered to close slightly before closePosition.
/---------------\
/ \
/ \
1 2 3 - 4 5 6
(Figure indicates velocity of the axis and keys to the points are given below.)
Point 1: actual start position (open position - start position offset)
Point 2: time after motor has reached desired speed, before it reaches the desired start position
Points 3 and 4: at velocity, the start point (shutterIsOpenPosition) and end point of the desired
exposure range. Right before points 3 and 4, the shutter will be triggered to open
(shutterOpenIsTriggeredPosition) or close, respectively. gda/px/camera/Trigger will handle
the triggering.
Point 5: exposure has finished (beyond close position), but before deceleration has started
Point 6: decelerating to final stop position (close position + end position offset)
-
Method Summary
Modifier and TypeMethodDescriptionvoidPerform the calculations necessary to get the actual start position of the move, and the final end position.voidexpose()Perform the actual move, once the exposure has been prepared with prepareForExposure()doubledoubleThe final position at which the shutter is expected to be opendoubledoubledoubledoubledoubleThe actual position where the move will concludedoubledoubleRetrieve the time between the close position and when the deceleration should startdoubleThe minimum difference between the start and open positions.doubleThe minimum time to velocity.doubledoubleThe initial position at which the shutter is expected to be opendoubleThe actual position where the move will startdoubledoublevoidMove the motor to the actual start position required for proper run-up to the desired velocity.voidsetAcceleration(double acceleration) voidsetClosePosition(double closePosition) The exact position where the shutter is expected to be closed.voidsetDefaultSpeed(double defaultSpeed) voidReset to the default speed and default time to velocity, usually done after an exposure()voidsetDefaultTimeToVelocity(double desiredTimeToVelocity) voidsetDesiredSpeed(double desiredSpeed) voidsetDesiredTimeToVelocity(double desiredTimeToVelocity) voidsetEndTimeFudgeFactor(double fudgeTime) voidsetExposureTime(double exposureTime) voidsetMinimumTimeToVelocity(double minimumTimeToVelocity) The minimum time to velocity.voidsetMotor(ScannableMotor theMotor) voidsetMoveDistance(double moveDistance) The distance between the open and close positionsvoidsetOpenPosition(double openPosition) voidsetStartTimeFudgeFactor(double fudgeTime) Methods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Method Details
-
setMotor
-
prepareForExposure
Move the motor to the actual start position required for proper run-up to the desired velocity. Set speed and time to velocity on underlying motor to accomplish the move properly. Done after setDefaultSpeeds() to ensure that axes are moving fast to the start position.- Throws:
DeviceException
-
doCalculations
void doCalculations()Perform the calculations necessary to get the actual start position of the move, and the final end position. -
expose
Perform the actual move, once the exposure has been prepared with prepareForExposure()- Throws:
DeviceException
-
setDefaultSpeeds
Reset to the default speed and default time to velocity, usually done after an exposure()- Throws:
DeviceException
-
setDesiredSpeed
void setDesiredSpeed(double desiredSpeed) - Parameters:
desiredSpeed-
-
getDesiredSpeed
double getDesiredSpeed()- Returns:
- speed
-
setDefaultSpeed
void setDefaultSpeed(double defaultSpeed) - Parameters:
defaultSpeed-
-
getDefaultSpeed
double getDefaultSpeed() -
setDesiredTimeToVelocity
void setDesiredTimeToVelocity(double desiredTimeToVelocity) - Parameters:
desiredTimeToVelocity-
-
getDesiredTimeToVelocity
double getDesiredTimeToVelocity()- Returns:
- desiredTimeToVelocity
-
setDefaultTimeToVelocity
void setDefaultTimeToVelocity(double desiredTimeToVelocity) - Parameters:
desiredTimeToVelocity-
-
getDefaultTimeToVelocity
double getDefaultTimeToVelocity()- Returns:
- defaultTimeToVelocity
-
setMinimumTimeToVelocity
void setMinimumTimeToVelocity(double minimumTimeToVelocity) The minimum time to velocity.- Parameters:
minimumTimeToVelocity-
-
getMinimumTimeToVelocity
double getMinimumTimeToVelocity()The minimum time to velocity. If the desired time to velocity is set to less than this value, it will be replaced by the minimumTimeToVelocity- Returns:
- minimum time to velocity
-
setOpenPosition
void setOpenPosition(double openPosition) - Parameters:
openPosition-
-
getOpenPosition
double getOpenPosition()The initial position at which the shutter is expected to be open -
setClosePosition
void setClosePosition(double closePosition) The exact position where the shutter is expected to be closed.- Parameters:
closePosition-
-
getClosePosition
double getClosePosition()The final position at which the shutter is expected to be open -
getStartPositionOffset
double getStartPositionOffset()- Returns:
- startPositionOffset the offset from the actual start position when prepareForExposure() is done
-
getEndPositionOffset
double getEndPositionOffset()- Returns:
- endPositionOffset the offset from the close position that expose() will move to
-
getMinimumStartToOpenPositionDifference
double getMinimumStartToOpenPositionDifference()The minimum difference between the start and open positions. Also used for end and close positions.- Returns:
- minimumDiff
-
setExposureTime
void setExposureTime(double exposureTime) - Parameters:
exposureTime-
-
setStartTimeFudgeFactor
void setStartTimeFudgeFactor(double fudgeTime) - Parameters:
fudgeTime-
-
getStartTimeFudgeFactor
double getStartTimeFudgeFactor()- Returns:
- fudgeTime the time allowed between the axis reaching full velocity and reaching the start position
-
setEndTimeFudgeFactor
void setEndTimeFudgeFactor(double fudgeTime) - Parameters:
fudgeTime-
-
getEndTimeFudgeFactor
double getEndTimeFudgeFactor()Retrieve the time between the close position and when the deceleration should start- Returns:
- fudgeTime
-
getStartPosition
double getStartPosition()The actual position where the move will start- Returns:
- start position
-
getEndPosition
double getEndPosition()The actual position where the move will conclude- Returns:
- final position
-
setMoveDistance
void setMoveDistance(double moveDistance) The distance between the open and close positions- Parameters:
moveDistance-
-
getMoveDistance
double getMoveDistance()- Returns:
- distance between open and close positions
-
setAcceleration
void setAcceleration(double acceleration) -
getAcceleration
double getAcceleration()
-