Package gda.device.temperature
Class LinkamT95
- All Implemented Interfaces:
INeXusInfoWriteable,Device,Scannable,ScannableMotion,Temperature,Configurable,Findable,gda.observable.IObservable,AlarmListener,org.springframework.beans.factory.InitializingBean
public class LinkamT95
extends TemperatureBase
implements org.springframework.beans.factory.InitializingBean
Class to control a LinkamCI Those computer interface boxes control the Linkam range of heating/freezing stages. They
offer a serial connection.
-
Field Summary
Fields inherited from class gda.device.temperature.TemperatureBase
bufferedData, busy, count, currentRamp, currentTemp, dataFileWriter, dataWriter, fileSuffix, LONG_POLL_TIME, longPollTime, lowerTemp, POLL_TIME, pollTime, probeNameList, rampList, setPoint, SHORT_POLL_TIME, targetTemp, timeSinceStart, upperTempFields 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.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()Close and unconfigure the device.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.voiddoStart()voiddoStop()static doubleextractTemperature(String string) Extracts the current temperature from a four byted string (from either a T or D reply)getAttribute(String name) Overrides the DeviceBase method to get current DSC dataset name.List<double[]> doubleGets the current temperature by asking the actual LinkamCIdoubleGets the current temperature without asking the actual LinkamCIvoidhold()Stops running ramps or moving to temperature but holds the current temperaturebooleanCheck the current temperature against the target temperaturereadout()voidRe-initialisation of values and states.voidrunRamp()Run the ramp sequence.voidsendHold()Sends a hold commandvoidsendLimit(double limit) Set limit temperature.voidsendNotify(String additionalData) Sends a notifyIObservers with a TemperatureStatus.protected voidsendRamp(int which) Sends the ramps to the hardware.voidsendRate(double rate) Set rate (in degrees/minute).voidSends a start commandvoidsendStop()Sends a stop commmandvoidsetAttribute(String name, Object value) Overrides the DeviceBase method to provide commands for a liquid nitrogen pumpprotected voidsetHWLowerTemp(double lowerTemp) protected voidsetHWUpperTemp(double upperTemp) voidsetProbeNames(List<String> probeNames) Do nothing in this method as we don't want probeNames configured in xml.voidsetSerialReaderWriter(SerialReaderWriter serialReaderWriter) protected voidvoidShould send hardware commands to start heating or cooling towards a single targetTempvoidstartTowardsTarget(double targetTemp) voidCalled each time the poller goes round.Methods inherited from class gda.device.temperature.TemperatureBase
addRamp, alarm, begin, cancelAlarm, clearRamps, end, getAccuracy, getCurrentPositionArray, getDataDimensions, getFileSuffix, getLowerTemp, getPolltime, getProbeNames, getRampRate, getTargetTemperature, getUpperTemp, isBusy, isRunning, rawAsynchronousMoveTo, rawGetPosition, setAccuracy, setFileSuffix, setLowerTemp, setPolltime, setProbe, setRampRate, setRamps, setTargetTemperature, setUpdatePeriod, setUpperTemp, start, startHoldTimer, startPoller, stop, stopPoller, waitForTempMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, externalToInternal, generateScannableLimitsReport, getAdditionalPositionValidators, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, internalToExternal, isAt, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, toFormattedString, 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, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfiguredMethods inherited from interface gda.device.Device
getProtectionLevel, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString, waitWhileBusy
-
Constructor Details
-
LinkamT95
public LinkamT95()Constructor
-
-
Method Details
-
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 classTemperatureBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase- Throws:
FactoryException
-
close
Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Overrides:
closein classDeviceBase- Throws:
DeviceException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getSerialReaderWriter
-
setSerialReaderWriter
-
setProbeNames
Do nothing in this method as we don't want probeNames configured in xml. There can only be 1 temperature sensor whose name we determine when the device is configured.- Overrides:
setProbeNamesin classTemperatureBase- Parameters:
probeNames- the probe name (used by Castor)
-
extractTemperature
Extracts the current temperature from a four byted string (from either a T or D reply)- Parameters:
string- the four byte substring- Returns:
- the current temperature
-
getCurrentTemperature
Gets the current temperature by asking the actual LinkamCI- Specified by:
getCurrentTemperaturein interfaceTemperature- Returns:
- currentTemp
- Throws:
DeviceException
-
getTemperature
public double getTemperature()Gets the current temperature without asking the actual LinkamCI- Returns:
- temperature (in degreesC)
-
sendRamp
protected void sendRamp(int which) Sends the ramps to the hardware.- Specified by:
sendRampin classTemperatureBase- Parameters:
which- the current ramp
-
isAtTargetTemperature
Description copied from interface:TemperatureCheck the current temperature against the target temperature- Specified by:
isAtTargetTemperaturein interfaceTemperature- Overrides:
isAtTargetTemperaturein classTemperatureBase- Returns:
- true if at the desired temperature
- Throws:
DeviceException
-
hold
public void hold()Description copied from interface:TemperatureStops running ramps or moving to temperature but holds the current temperature- Specified by:
holdin interfaceTemperature
-
temperatureUpdate
public void temperatureUpdate()Called each time the poller goes round.- Specified by:
temperatureUpdatein classTemperatureBase
-
sendNotify
Sends a notifyIObservers with a TemperatureStatus. Used by stages to notify IObservers of the Controller.- Parameters:
additionalData- set as the additionalData field of the TemperatureStatus which is sent in the notify.
-
sendHold
public void sendHold()Sends a hold command -
sendLimit
public void sendLimit(double limit) Set limit temperature.- Parameters:
limit- is the temperature limit to a resolution of 0.1degC, max value 99.9
-
sendRate
public void sendRate(double rate) Set rate (in degrees/minute).- Parameters:
rate- is the heating/cooling rate. The rate is 0.01degC/min. The maximum is 99.99degC/min.
-
sendStart
public void sendStart()Sends a start command -
sendStop
public void sendStop()Sends a stop commmand -
doStart
- Specified by:
doStartin classTemperatureBase- Throws:
DeviceException
-
startNextRamp
- Specified by:
startNextRampin classTemperatureBase- Throws:
DeviceException
-
doStop
public void doStop()- Specified by:
doStopin classTemperatureBase
-
setAttribute
Overrides the DeviceBase method to provide commands for a liquid nitrogen pump- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
name- the name of the attribute to setvalue- the attribute value
-
getAttribute
Overrides the DeviceBase method to get current DSC dataset name.- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classScannableMotionBase- Parameters:
name- the attribute name to get- Returns:
- the attribute value
- See Also:
-
startTowardsTarget
Description copied from class:TemperatureBaseShould send hardware commands to start heating or cooling towards a single targetTemp- Specified by:
startTowardsTargetin classTemperatureBase- Throws:
DeviceException
-
startTowardsTarget
- Throws:
DeviceException
-
setHWLowerTemp
- Specified by:
setHWLowerTempin classTemperatureBase- Parameters:
lowerTemp-- Throws:
DeviceException
-
setHWUpperTemp
- Specified by:
setHWUpperTempin classTemperatureBase- Parameters:
upperTemp-- Throws:
DeviceException
-
runRamp
Description copied from class:TemperatureBaseRun the ramp sequence.- Specified by:
runRampin classTemperatureBase- Throws:
DeviceException
-
getBufferedData
-
readout
- Overrides:
readoutin classTemperatureBase
-