Class DummyEpicsLakeshore336
- All Implemented Interfaces:
Device,Scannable,Configurable,Findable,gda.observable.IObservable
The dummy version returns random temperatures between 0K and 500K, and random heating percentage.
Device online manual http://www.lakeshore.com/Documents/336_Manual.pdf
The class was originally written for use on i05 but is also used on i09
-
Field Summary
Fields 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, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSwitches off all the outputsvoidasynchronousMoveTo(Object externalPosition) Trigger a move/operation and return immediately.voidSwitches blocking off.voidSwitches ramping off for the currently active output.voidSwitches blocking on.voidSwitches ramping on for the currently active output.intGets the output which is currently being controlled by GDAdoubleGets the current temperature of the input used for the currently active output.doubleGets the current demand temperature for the active output in K.doublegetD()Gets the derivative term for the PID control, for the currently active output.doubleGets the current heater output percentage from the currently active output.intGets the heater range for the currently active output.doublegetI()Gets the integral term for the PID control, for the currently active output.intgetInput()Gets the input channel selected for the currently active outputdoubleGets the manual output for the currently active output.doublegetP()Gets the proportional term for the PID control, for the currently active output.Object[]Returns the current position of the Scannable.doubleGet the ramping rate for the currently active output in K/sec.doubleGets the targeted demand temperature for the active output in K.doublegetTemperature(int channel) Gets the current temperature from the specified channel.doublebooleanFinds out if the Lakeshore is currently blocking.booleanisBusy()Checks if the Lakeshore is still busy to allow blocking.booleanFinds out if ramping is enabled on the current active output.voidSwitches off the currently active outputvoidsetActiveOutput(int activeOutput) Sets the output to be controlled by GDA between 1 and 4voidsetD(double demandD) Sets the derivative term for the PID control, for the currently active output.voidsetDemandTemperature(double demandTemperature) Sets the demand temperature for the currently active output.voidsetHeaterRange(int heaterRange) Sets the heater range for the currently active output.voidsetI(double demandI) Sets the integral term for the PID control, for the currently active output.voidsetInput(int input) Sets the input channel selected for the currently active outputvoidsetManualOutput(double manualOutput) Sets the manual output for the currently active output.voidsetP(double demandP) Sets the proportional term for the PID control, for the currently active output.voidsetRampEnabled(boolean rampEnabled) Enables or disables ramping for the currently active output.voidsetRampRate(double rampRate) Sets the ramping rate in K/sec for the currently active output.voidsetTolerance(double tolerance) Methods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, 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
configure, 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, deleteIObservers
-
Constructor Details
-
DummyEpicsLakeshore336
public DummyEpicsLakeshore336()
-
-
Method Details
-
getTolerance
public double getTolerance() -
setTolerance
public void setTolerance(double tolerance) -
isBusy
Checks if the Lakeshore is still busy to allow blocking.If
isBlocking()is false this will always returnfalse
If the heater for the currently active loop is off this will returnfalse
If the current demand has not yet reached the target demand this will returntrue
If abs(controlled temperature - target temperature) >getTolerance()will returntrue- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException- See Also:
-
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 classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
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 classScannableBase- Parameters:
externalPosition- Position to move to should have an element for each input field.- Throws:
DeviceException
-
getHeaterPercent
Gets the current heater output percentage from the currently active output.- Returns:
- The current heater output percentage
- Throws:
DeviceException
-
getTemperature
Gets the current temperature from the specified channel.Channel is between 0 and 3 inclusive
- Parameters:
channel- The channel to get- Returns:
- The current temperature in K
- Throws:
DeviceException
-
getControlledTemperature
Gets the current temperature of the input used for the currently active output.- Returns:
- The current temperature of the controlled input in K
- Throws:
DeviceException
-
getInput
Gets the input channel selected for the currently active output0 = None
1 = Input 1 = Channel 0
2 = Input 2 = Channel 1
3 = Input 3 = Channel 2
4 = Input 4 = Channel 2- Returns:
- The input selected for the currently active output
- Throws:
DeviceException
-
setInput
Sets the input channel selected for the currently active output0 = None
1 = Input 1 = Channel 0
2 = Input 2 = Channel 1
3 = Input 3 = Channel 2
4 = Input 4 = Channel 2- Parameters:
input- The input to use for the control- Throws:
DeviceException
-
setDemandTemperature
Sets the demand temperature for the currently active output. If ramping is enabled then the actual demand temperature will move towards this at the ramping rate.- Parameters:
demandTemperature- The demanded temperature in K- Throws:
DeviceException- See Also:
-
getCurrentDemandTemperature
Gets the current demand temperature for the active output in K. If ramping is disabled this should be equal to the target demand temperature. If ramping is enabled this will follow the target demand temperature at the set rate.- Returns:
- The current demand temperature from the readback value
- Throws:
DeviceException- See Also:
-
getTargetDemandTemperature
Gets the targeted demand temperature for the active output in K. If ramping is disabled this should be equal to the target demand temperature. If ramping is enabled this will follow the target demand temperature at the set rate.- Returns:
- The target demand temperature set
- Throws:
DeviceException- See Also:
-
setManualOutput
Sets the manual output for the currently active output.- Parameters:
manualOutput- The requested manual output- Throws:
DeviceException
-
getManualOutput
Gets the manual output for the currently active output.- Returns:
- The current manual output
- Throws:
DeviceException
-
setP
Sets the proportional term for the PID control, for the currently active output.- Parameters:
demandP-- Throws:
DeviceException
-
getP
Gets the proportional term for the PID control, for the currently active output.- Returns:
- Proportional term
- Throws:
DeviceException
-
setI
Sets the integral term for the PID control, for the currently active output.- Parameters:
demandI-- Throws:
DeviceException
-
getI
Gets the integral term for the PID control, for the currently active output.- Returns:
- Integral term
- Throws:
DeviceException
-
setD
Sets the derivative term for the PID control, for the currently active output.- Parameters:
demandD-- Throws:
DeviceException
-
getD
Gets the derivative term for the PID control, for the currently active output.- Returns:
- Derivative term
- Throws:
DeviceException
-
setHeaterRange
Sets the heater range for the currently active output.0=Off, 1=Low, 2=Med, 3=High
- Parameters:
heaterRange- The demanded heater range- Throws:
DeviceException
-
getHeaterRange
Gets the heater range for the currently active output.0=Off, 1=Low, 2=Med, 3=High
- Returns:
- The heater range
- Throws:
DeviceException
-
setRampRate
Sets the ramping rate in K/sec for the currently active output.- Parameters:
rampRate- The desired ramping rate in K/sec- Throws:
DeviceException- See Also:
-
getRampRate
Get the ramping rate for the currently active output in K/sec.- Returns:
- The ramping rate for the currently active output in K/sec
- Throws:
DeviceException
-
setRampEnabled
Enables or disables ramping for the currently active output.- Parameters:
rampEnabled-- Throws:
DeviceException- See Also:
-
isRampEnabled
Finds out if ramping is enabled on the current active output.- Returns:
- The current ramping status
- Throws:
DeviceException
-
enableRamping
Switches ramping on for the currently active output.- Throws:
DeviceException- See Also:
-
disableRamping
Switches ramping off for the currently active output.- Throws:
DeviceException- See Also:
-
enableBlocking
public void enableBlocking()Switches blocking on. When the temperature is changed the device will be busy until the ramping finishes (if enabled) and the demand temperature is reached (within tolerance).- See Also:
-
disableBlocking
public void disableBlocking()Switches blocking off.isBusy()will always returnfalse. This allows the temperature to be recorded at every point in the scan without waiting for a demand temperature to be reached, or to start a temperature ramp in a script and then perform other operations.- See Also:
-
isBlocking
public boolean isBlocking()Finds out if the Lakeshore is currently blocking.- Returns:
- current blocking status
- See Also:
-
getActiveOutput
public int getActiveOutput()Gets the output which is currently being controlled by GDA- Returns:
- The currently active output
-
setActiveOutput
Sets the output to be controlled by GDA between 1 and 4Switching active output does not switch off other outputs it just changes which output GDA is talking to.
- Parameters:
activeOutput- The output to control- Throws:
DeviceException
-
outputOff
Switches off the currently active output- Throws:
DeviceException
-
allOutputsOff
Switches off all the outputs- Throws:
DeviceException
-