Package gda.device.zebra
Class ZebraScannableMotor
- All Implemented Interfaces:
INeXusInfoWriteable,ControllerRecord,Device,IScannableMotor,Scannable,ContinuouslyScannableViaController,PositionCallableProvider<Double>,ScannableMotion,ScannableMotionUnits,ZebraMotorInfoProvider,Configurable,Findable,gda.observable.IObservable,org.springframework.beans.factory.InitializingBean
public class ZebraScannableMotor
extends ScannableMotor
implements ContinuouslyScannableViaController, ZebraMotorInfoProvider, PositionCallableProvider<Double>, org.springframework.beans.factory.InitializingBean
Class to use with ZebraConstantVelocityMoveController and ConstantVelocityScanLine to perform flyscans
-
Field Summary
Fields inherited from class gda.device.scannable.ScannableMotor
COPY_MOTOR_LIMITS_INTO_SCANNABLE_LIMITSFields inherited from class gda.device.scannable.ScannableMotionUnitsBase
unitsComponentFields inherited from class gda.device.scannable.ScannableMotionBase
numberTries, toleranceFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.IScannableMotor
WAS_ALREADY_BUSY_SO_COULD_NOT_BE_MOVEDFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITSFields inherited from interface gda.device.ScannableMotionUnits
HARDWAREUNITS, USERUNITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidasynchronousMoveTo(Object position) Trigger a move/operation and return immediately.voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)doubledistanceToAccToVelocity(double velocity) doubleintgetPcEnc()Returns the current position of the Scannable.doublebooleanbooleanIndicates whether the Scannable has deferred control to the he configuredContinuousMoveControllervoidsetContinuousMoveController(ContinuousMoveController continuousMoveController) voidsetExposureStep(double exposureStep) voidsetExposureStepDefined(boolean exposureStepDefined) voidsetOperatingContinuously(boolean b) Enable or disable control through the configuredContinuousMoveControllervoidsetPcEnc(int pcEnc) voidsetScurveTimeToVelocity(double scurveTimeToVelocity) voidsetZebraConstantVelocityMoveController(ZebraConstantVelocityMoveController continuousMoveController) voidReturns when operation carried out by moveTo has completedMethods inherited from class gda.device.scannable.ScannableMotor
attachMotorObserver, configure, getActualPosition, getAttribute, getControllerRecordName, getDemandPosition, getDemandPositionTolerance, getFirstInputLimits, getLowerInnerLimit, getLowerMotorLimit, getMotor, getMotorLimitsComponent, getMotorName, getMotorResolution, getSpeed, getTimeToVelocity, getUpperInnerLimit, getUpperMotorLimit, getUserOffset, isBusy, isReturningDemandPosition, rawAsynchronousMoveTo, rawGetDemandPosition, rawGetPosition, setDemandPositionTolerance, setLogMoveRequestsWithInfo, setMotor, setMotorLimitsComponent, setMotorName, setNotifyObserverPositionChangeEvents, setPosition, setReturnDemandPosition, setSpeed, setTimeToVelocity, stop, toFormattedStringMethods inherited from class gda.device.scannable.ScannableMotionUnitsBase
addAcceptableUnit, externalToInternal, getAcceptableUnits, getHardwareUnitString, getInitialUserUnits, getOffset, getUserUnits, internalToExternal, isAt, setHardwareUnitString, setInitialUserUnits, setOffset, setOffset, setUserUnitsMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, generateScannableLimitsReport, getAdditionalPositionValidators, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getScalingFactor, getTolerances, getUpperGdaLimits, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, deleteIObserversMethods inherited from interface gda.device.Scannable
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, toFormattedStringMethods inherited from interface gda.device.ScannableMotion
a, ar, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, r, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimitsMethods inherited from interface gda.device.ScannableMotionUnits
addAcceptableUnit, getAcceptableUnits, getHardwareUnitString, getUserUnits, setHardwareUnitString, setOffset, setUserUnits
-
Constructor Details
-
ZebraScannableMotor
public ZebraScannableMotor()
-
-
Method Details
-
setOperatingContinuously
Description copied from interface:ContinuouslyScannableViaControllerEnable or disable control through the configuredContinuousMoveController- Specified by:
setOperatingContinuouslyin interfaceContinuouslyScannableViaController- Parameters:
b-- Throws:
DeviceException
-
isOperatingContinously
public boolean isOperatingContinously()Description copied from interface:ContinuouslyScannableViaControllerIndicates whether the Scannable has deferred control to the he configuredContinuousMoveController- Specified by:
isOperatingContinouslyin interfaceContinuouslyScannableViaController- Returns:
- true if control is defered
-
getContinuousMoveController
- Specified by:
getContinuousMoveControllerin interfaceContinuouslyScannableViaController
-
setZebraConstantVelocityMoveController
public void setZebraConstantVelocityMoveController(ZebraConstantVelocityMoveController continuousMoveController) -
setContinuousMoveController
- Specified by:
setContinuousMoveControllerin interfaceContinuouslyScannableViaController
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
asynchronousMoveTo
Description copied from class:ScannableBaseTrigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.- Specified by:
asynchronousMoveToin interfaceScannable- Overrides:
asynchronousMoveToin classScannableMotionBase- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException
-
getPosition
Description copied from class:ScannableMotorReturns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it. Return the demand position fromScannableMotor.getDemandPosition()if configured withScannableMotor.setReturnDemandPosition(boolean)to do so and the motor is not moving, otherwise returns the actual position. i.e. if the motor is moving the actual position is always returned.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableMotor- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
getPositionCallable
- Specified by:
getPositionCallablein interfacePositionCallableProvider<Double>- Throws:
DeviceException
-
waitWhileBusy
Description copied from class:ScannableBaseReturns when operation carried out by moveTo has completed If this is to be overriden, isBusy must also be valid. Although the pos and scan command currently use this method to determine if the Scannable is busy, this must not be relied upon.- Specified by:
waitWhileBusyin interfaceScannable- Overrides:
waitWhileBusyin classScannableMotor- Throws:
DeviceExceptionInterruptedException
-
distanceToAccToVelocity
public double distanceToAccToVelocity(double velocity) - Specified by:
distanceToAccToVelocityin interfaceZebraMotorInfoProvider- Parameters:
velocity- in units of motor units/second e.g. mm/s- Returns:
- distance in motor units e.g. mm
-
getScurveTimeToVelocity
public double getScurveTimeToVelocity() -
setScurveTimeToVelocity
public void setScurveTimeToVelocity(double scurveTimeToVelocity) - Parameters:
scurveTimeToVelocity- - if using linear acceleration this is the ACCEL field of the motor in EPICS (Time to Velocity)
-
getPcEnc
public int getPcEnc()- Specified by:
getPcEncin interfaceZebraMotorInfoProvider- Returns:
- index of Posn Trig PV of Zebra for this motor Enc1 = 0
-
setPcEnc
public void setPcEnc(int pcEnc) -
getActualScannableMotor
- Specified by:
getActualScannableMotorin interfaceZebraMotorInfoProvider- Returns:
- The actual ScannableMotor that will be moved during the scan
-
getExposureStep
public double getExposureStep()- Specified by:
getExposureStepin interfaceZebraMotorInfoProvider- Returns:
- The size of the step of the motor to move during exposure
-
setExposureStep
public void setExposureStep(double exposureStep) -
isExposureStepDefined
public boolean isExposureStepDefined()- Specified by:
isExposureStepDefinedin interfaceZebraMotorInfoProvider- Returns:
- True if getExposureStep represents the size of the step of the motor to move during exposure.
-
setExposureStepDefined
public void setExposureStepDefined(boolean exposureStepDefined) -
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-