Package gda.device.currentamplifier
Class EpicsFemtoAmplifier
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.currentamplifier.CurrentAmplifierBase
gda.device.currentamplifier.EpicsFemtoAmplifier
- All Implemented Interfaces:
AmplifierAutoGain,CurrentAmplifier,Device,Scannable,Configurable,Findable,gda.observable.IObservable,org.springframework.beans.factory.InitializingBean
public class EpicsFemtoAmplifier
extends CurrentAmplifierBase
implements AmplifierAutoGain, org.springframework.beans.factory.InitializingBean
This class is for controlling a Femto current amplifier.
The Femto amplifies the input current usually in mA or less and outputs a voltage as determined by the gain setting. i.e a 1x10^-6 A current with a 10^6 gain will output 1 V
The output of Femto usually feeds into ADC which offers the ability to average the voltage over time to improve the signal to noise ratio.
The EPICS EDM for these devices are:
The Femto
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface gda.device.CurrentAmplifier
CurrentAmplifier.Status -
Field Summary
Fields inherited from class gda.device.currentamplifier.CurrentAmplifierBase
gainPositions, gainUnits, modePositionsFields 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.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck all essential bean properties have been set.voidasynchronousMoveTo(Object position) Trigger a move/operation and return immediately.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.doublereturns the current valuegetGain()returns the current gain positionString[]Returns an array of all possible gain positions which this device can be moved to.returns the current gain unitString[]Returns an array of all possible gain units which this device can be moved to.doubledoublegetMode()Gets the operation mode of the femto.String[]Returns an array of all possible mode positions which this device can be set to.Returns the current position of the Scannable.longReturns the overload statusdoublebooleanbooleanincreaseOrDecreaseGain(int indexIncrement) booleanisBusy()Check if the Scannable is moving/operating.booleanbooleanvoidreturns a parsed list of gains available for this amplifier.voidsetBasePVName(String basePVName) voidsetCouplingMode(String couplingMode) Set the Femto coupling mode, takes a string for Jython to usevoidsetFemtoCouplingMode(EpicsFemtoAmplifier.CouplingMode couplingMode) voidsetGain(double newGain) voidThis is the method which actually writes to the gain PV.voidsetGainUnit(String unit) Moves amplifier's gain unit to the named unit.voidsetHasIinPV(boolean hasIinPV) voidsetLowerVoltageBound(double lowerVoltageBound) voidChanges the operation mode of the femto.voidvoidsetSettleTime(long settleTime) voidsetSupportsCoupling(boolean supportsCoupling) voidsetUpperVoltageBound(double upperVoltageBound) Methods inherited from class gda.device.currentamplifier.CurrentAmplifierBase
checkPositionValidMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toFormattedString, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, 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.device.AmplifierAutoGain
decreaseGain, increaseGain, optimiseGainMethods inherited from interface gda.factory.Configurable
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, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, toFormattedString, waitWhileBusy
-
Constructor Details
-
EpicsFemtoAmplifier
public EpicsFemtoAmplifier()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()check all essential bean properties have been set. This must be used to specify a custom init-method in an XML bean definition.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
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 classCurrentAmplifierBase- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException
-
getPosition
Description copied from class:ScannableBaseReturns 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.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classCurrentAmplifierBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
isBusy
public boolean isBusy()Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classCurrentAmplifierBase- Returns:
- true - if operation carried out by moveTo has not completed yet
-
setMode
Changes the operation mode of the femto.- Specified by:
setModein interfaceCurrentAmplifier- Parameters:
mode- The requested operation mode- Throws:
DeviceException- If the mode change failsIllegalArgumentException- If mode is not in modeToGainToGainStringMap
-
getMode
Gets the operation mode of the femto.- Specified by:
getModein interfaceCurrentAmplifier- Returns:
- The current operation mode
- Throws:
DeviceException- If the mode change fails
-
increaseOrDecreaseGain
- Specified by:
increaseOrDecreaseGainin interfaceAmplifierAutoGain- Throws:
DeviceException
-
getInstantaneousVoltage
- Specified by:
getInstantaneousVoltagein interfaceAmplifierAutoGain- Throws:
DeviceException
-
setGain
- Throws:
DeviceException
-
getGain
Description copied from interface:CurrentAmplifierreturns the current gain position- Specified by:
getGainin interfaceCurrentAmplifier- Returns:
- gain position
- Throws:
DeviceException
-
setGain
This is the method which actually writes to the gain PV. It should only be passed strings taken from thegetModeToGainToGainStringMap()- Specified by:
setGainin interfaceCurrentAmplifier- Parameters:
gain-- Throws:
DeviceException
-
setCouplingMode
Set the Femto coupling mode, takes a string for Jython to use- Parameters:
couplingMode- The requested coupling mode- Throws:
DeviceException
-
setFemtoCouplingMode
public void setFemtoCouplingMode(EpicsFemtoAmplifier.CouplingMode couplingMode) throws DeviceException - Throws:
DeviceException
-
getCouplingMode
- Specified by:
getCouplingModein interfaceAmplifierAutoGain- Throws:
DeviceException
-
hasMultipleModes
public boolean hasMultipleModes()- Specified by:
hasMultipleModesin interfaceAmplifierAutoGain
-
getModeToGainToGainStringMap
-
setModeToGainToGainStringMap
-
isSupportsCoupling
public boolean isSupportsCoupling()- Specified by:
isSupportsCouplingin interfaceAmplifierAutoGain
-
setSupportsCoupling
public void setSupportsCoupling(boolean supportsCoupling) -
getLowerVoltageBound
public double getLowerVoltageBound()- Specified by:
getLowerVoltageBoundin interfaceAmplifierAutoGain
-
setLowerVoltageBound
public void setLowerVoltageBound(double lowerVoltageBound) -
getUpperVoltageBound
public double getUpperVoltageBound()- Specified by:
getUpperVoltageBoundin interfaceAmplifierAutoGain
-
setUpperVoltageBound
public void setUpperVoltageBound(double upperVoltageBound) -
getSettleTime
public long getSettleTime() -
setSettleTime
public void setSettleTime(long settleTime) -
isHasIinPV
public boolean isHasIinPV() -
setHasIinPV
public void setHasIinPV(boolean hasIinPV) -
getBasePVName
-
setBasePVName
-
getGainPositions
Description copied from interface:CurrentAmplifierReturns an array of all possible gain positions which this device can be moved to.- Specified by:
getGainPositionsin interfaceCurrentAmplifier- Overrides:
getGainPositionsin classCurrentAmplifierBase- Returns:
- an array of gain positions
- Throws:
DeviceException
-
getGainUnits
Description copied from interface:CurrentAmplifierReturns an array of all possible gain units which this device can be moved to.- Specified by:
getGainUnitsin interfaceCurrentAmplifier- Overrides:
getGainUnitsin classCurrentAmplifierBase- Returns:
- an array of gain units
- Throws:
DeviceException
-
getModePositions
Description copied from interface:CurrentAmplifierReturns an array of all possible mode positions which this device can be set to.- Specified by:
getModePositionsin interfaceCurrentAmplifier- Overrides:
getModePositionsin classCurrentAmplifierBase- Returns:
- an array of mode positions
- Throws:
DeviceException
-
setGainUnit
Description copied from interface:CurrentAmplifierMoves amplifier's gain unit to the named unit.- Specified by:
setGainUnitin interfaceCurrentAmplifier- Parameters:
unit-- Throws:
DeviceException
-
getGainUnit
Description copied from interface:CurrentAmplifierreturns the current gain unit- Specified by:
getGainUnitin interfaceCurrentAmplifier- Returns:
- gain unit
- Throws:
DeviceException
-
getCurrent
Description copied from interface:CurrentAmplifierreturns the current value- Specified by:
getCurrentin interfaceCurrentAmplifier- Returns:
- current
- Throws:
DeviceException
-
getStatus
Description copied from interface:CurrentAmplifierReturns the overload status- Specified by:
getStatusin interfaceCurrentAmplifier- Returns:
- the status
- Throws:
DeviceException
-
listGains
Description copied from interface:CurrentAmplifierreturns a parsed list of gains available for this amplifier.- Specified by:
listGainsin interfaceCurrentAmplifier- Throws:
DeviceException
-