Package gda.device.currentamplifier
Class EpicsStanfordAmplifer
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.currentamplifier.CurrentAmplifierBase
gda.device.currentamplifier.EpicsStanfordAmplifer
- All Implemented Interfaces:
AmplifierAutoGain,CurrentAmplifier,StanfordAmplifier,Device,Scannable,Configurable,Findable,gda.observable.IObservable,org.springframework.beans.factory.InitializingBean
public class EpicsStanfordAmplifer
extends CurrentAmplifierBase
implements AmplifierAutoGain, StanfordAmplifier, org.springframework.beans.factory.InitializingBean
this class is for controlling s Stanford current amplifier via EPICS.
The Stanford amplifies the input current usually in pA, nA, uA, or mA and outputs a voltage as determined by the sensitivity setting. i.e a 1x10^-6 A current with a 10^6 gain will output 1 V
The output of Stanford 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 Standford
-
Nested Class Summary
Nested classes/interfaces inherited from interface gda.device.CurrentAmplifier
CurrentAmplifier.Status -
Field Summary
FieldsFields 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.voidclear()clear input filter overloadvoidDefault 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.String[]doubleget Bias voltagedoublereturns the current valueintget filter high pass frequency 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHzintreturn the index of filter low pass frequency 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHz 12 = 30 kHz 13 = 100 kHz 14 = 300 kHz 15 = 1 MHzintget the filter type value 0 = 6dB High Pass 1 = 12dB High Pass 2 = 6dB Band Pass 3 = 6dB Low Pass 4 = 12dB Low Pass 5 = NonegetGain()returns the current gain positionreturns the current gain unitString[]Returns an array of all possible gain units which this device can be moved to.doubledoublegetMode()gets the amplifier's mode of operationintintString[]Returns the current position of the Scannable.intintlongintreturn the index of the signal invert, 0 = Non-Inverted, 1 = InvertedReturns the overload statusdoublebooleanbooleanincreaseOrDecreaseGain(int i) booleanbooleancheck if bias voltage switched on or notbooleanisBusy()Check if the Scannable is moving/operating.booleanbooleanvoidreturns a parsed list of gains available for this amplifier.voidrestore()restore default settingsvoidsetAllowUnitsChange(boolean allowUnitsChange) voidsetBasePVName(String basePVName) voidsetBiasVoltage(double bias) set bias voltagevoidsetBiasVoltageOn(boolean switchOn) switch bias voltage on (true) or off (false)voidsetFilterHighpassFrequency(int index) set the filter high pass frequency using index position 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHzvoidsetFilterLowpassFrequency(int index) set the filter low pass frequency using index position 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHz 12 = 30 kHz 13 = 100 kHz 14 = 300 kHz 15 = 1 MHzvoidsetFilterType(int index) set filter type using index position 0 = 6dB High Pass 1 = 12dB High Pass 2 = 6dB Band Pass 3 = 6dB Low Pass 4 = 12dB Low Pass 5 = NonevoidMoves amplifier's gain to the named position.voidsetGainUnit(String unit) Moves amplifier's gain unit to the named unit.voidsetInstantaneousPV(String instantaneousPV) voidsetLowerVoltageBound(double lowerVoltageBound) voidsets the amplifier's mode of operationvoidsetOffset(int offset) voidsetOffsetCurrentOn(boolean switchOn) voidsetOffsetUnit(int unit) voidsetSensitivity(int sensitivity) voidsetSensitivityUnit(int unit) voidsetSettleTime(long settleTime) voidsetSignalInvert(int index) set the signal invert using index, 0 = Non-Inverted, 1 = InvertedvoidsetUpperVoltageBound(double upperVoltageBound) Methods inherited from class gda.device.currentamplifier.CurrentAmplifierBase
checkPositionValid, getGainPositions, getModePositionsMethods 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.CurrentAmplifier
getGainPositions, getModePositionsMethods 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
-
Field Details
-
currentOffsetUnits
-
-
Constructor Details
-
EpicsStanfordAmplifer
public EpicsStanfordAmplifer()
-
-
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
-
increaseOrDecreaseGain
- Specified by:
increaseOrDecreaseGainin interfaceAmplifierAutoGain- Throws:
DeviceException
-
setGain
Description copied from interface:CurrentAmplifierMoves amplifier's gain to the named position.- Specified by:
setGainin interfaceCurrentAmplifier- Parameters:
gain-- Throws:
DeviceException
-
getGain
Description copied from interface:CurrentAmplifierreturns the current gain position- Specified by:
getGainin interfaceCurrentAmplifier- Returns:
- gain position
- Throws:
DeviceException
-
getGainFromEpics
- 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
-
setMode
Description copied from interface:CurrentAmplifiersets the amplifier's mode of operation- Specified by:
setModein interfaceCurrentAmplifier- Parameters:
mode-- Throws:
DeviceException
-
getMode
Description copied from interface:CurrentAmplifiergets the amplifier's mode of operation- Specified by:
getModein interfaceCurrentAmplifier- Returns:
- mode
- 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
-
getCouplingMode
- Specified by:
getCouplingModein interfaceAmplifierAutoGain- Throws:
DeviceException
-
isSupportsCoupling
public boolean isSupportsCoupling()- Specified by:
isSupportsCouplingin interfaceAmplifierAutoGain
-
hasMultipleModes
public boolean hasMultipleModes()- Specified by:
hasMultipleModesin interfaceAmplifierAutoGain
-
getInstantaneousVoltage
- Specified by:
getInstantaneousVoltagein interfaceAmplifierAutoGain- Throws:
DeviceException
-
getSensitivity
- Specified by:
getSensitivityin interfaceStanfordAmplifier- Throws:
DeviceException
-
getSensitivityUnit
- Specified by:
getSensitivityUnitin interfaceStanfordAmplifier- Throws:
DeviceException
-
isOffsetCurrentOn
- Specified by:
isOffsetCurrentOnin interfaceStanfordAmplifier- Throws:
DeviceException
-
setOffsetCurrentOn
- Specified by:
setOffsetCurrentOnin interfaceStanfordAmplifier- Throws:
DeviceException
-
getOffset
- Specified by:
getOffsetin interfaceStanfordAmplifier- Throws:
DeviceException
-
getOffsetUnit
- Specified by:
getOffsetUnitin interfaceStanfordAmplifier- Throws:
DeviceException
-
setSensitivity
- Specified by:
setSensitivityin interfaceStanfordAmplifier- Throws:
DeviceException
-
setSensitivityUnit
- Specified by:
setSensitivityUnitin interfaceStanfordAmplifier- Throws:
DeviceException
-
setOffset
- Specified by:
setOffsetin interfaceStanfordAmplifier- Throws:
DeviceException
-
setOffsetUnit
- Specified by:
setOffsetUnitin interfaceStanfordAmplifier- Throws:
DeviceException
-
isBiasVoltageOn
check if bias voltage switched on or not- Returns:
- true when on, false when off
- Throws:
DeviceException
-
setBiasVoltageOn
switch bias voltage on (true) or off (false)- Throws:
DeviceException
-
setBiasVoltage
set bias voltage- Parameters:
bias-- Throws:
DeviceException
-
getBiasVoltage
get Bias voltage- Returns:
- the bias voltage
- Throws:
DeviceException
-
setFilterType
set filter type using index position 0 = 6dB High Pass 1 = 12dB High Pass 2 = 6dB Band Pass 3 = 6dB Low Pass 4 = 12dB Low Pass 5 = None- Parameters:
index-- Throws:
DeviceException
-
getFilterType
get the filter type value 0 = 6dB High Pass 1 = 12dB High Pass 2 = 6dB Band Pass 3 = 6dB Low Pass 4 = 12dB Low Pass 5 = None- Returns:
- filter type index
- Throws:
DeviceException
-
setFilterHighpassFrequency
set the filter high pass frequency using index position 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHz- Parameters:
index-- Throws:
DeviceException
-
getFilterHighpassFrequency
get filter high pass frequency 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHz- Returns:
- the index position of the filter high pass frequency
- Throws:
DeviceException
-
setFilterLowpassFrequency
set the filter low pass frequency using index position 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHz 12 = 30 kHz 13 = 100 kHz 14 = 300 kHz 15 = 1 MHz- Parameters:
index-- Throws:
DeviceException
-
getFilterLowpassFrequency
return the index of filter low pass frequency 0 = 0.03 Hz 1 = 0.1 Hz 2 = 0.3 Hz 3 = 1 Hz 4 = 3 Hz 5 = 10 Hz 6 = 30 Hz 7 = 100 Hz 8 = 300 Hz 9 = 1 kHz 10 = 3 kHz 11 = 10 KHz 12 = 30 kHz 13 = 100 kHz 14 = 300 kHz 15 = 1 MHz- Returns:
- the index position
- Throws:
DeviceException
-
setSignalInvert
set the signal invert using index, 0 = Non-Inverted, 1 = Inverted- Parameters:
index-- Throws:
DeviceException
-
getSignalInvert
return the index of the signal invert, 0 = Non-Inverted, 1 = Inverted- Returns:
- the index of signal invert
- Throws:
DeviceException
-
restore
restore default settings- Throws:
DeviceException
-
clear
clear input filter overload- Throws:
DeviceException
-
getOffsetUnits
- Specified by:
getOffsetUnitsin interfaceStanfordAmplifier
-
getAllowedPositions
- Specified by:
getAllowedPositionsin interfaceStanfordAmplifier
-
getGainUnits
Description copied from interface:CurrentAmplifierReturns an array of all possible gain units which this device can be moved to.- Specified by:
getGainUnitsin interfaceCurrentAmplifier- Specified by:
getGainUnitsin interfaceStanfordAmplifier- Overrides:
getGainUnitsin classCurrentAmplifierBase- Returns:
- an array of gain units
-
getBasePVName
-
setBasePVName
-
getSettleTime
public long getSettleTime() -
setSettleTime
public void setSettleTime(long settleTime) -
getInstantaneousPV
-
setInstantaneousPV
-
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) -
isAllowUnitsChange
public boolean isAllowUnitsChange() -
setAllowUnitsChange
public void setAllowUnitsChange(boolean allowUnitsChange)
-