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.
  • Constructor Details

    • LinkamT95

      public LinkamT95()
      Constructor
  • Method Details

    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class TemperatureBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • reconfigure

      public void reconfigure() throws FactoryException
      Description copied from interface: Configurable
      Re-initialisation of values and states.

      Moved from Reconfigurable which has been deleted

      Specified by:
      reconfigure in interface Configurable
      Overrides:
      reconfigure in class ConfigurableBase
      Throws:
      FactoryException
    • close

      public void close() throws DeviceException
      Description copied from interface: Device
      Close and unconfigure the device.
      Specified by:
      close in interface Device
      Overrides:
      close in class DeviceBase
      Throws:
      DeviceException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getSerialReaderWriter

      public SerialReaderWriter getSerialReaderWriter()
    • setSerialReaderWriter

      public void setSerialReaderWriter(SerialReaderWriter serialReaderWriter)
    • setProbeNames

      public void setProbeNames(List<String> probeNames)
      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:
      setProbeNames in class TemperatureBase
      Parameters:
      probeNames - the probe name (used by Castor)
    • extractTemperature

      public static double extractTemperature(String string)
      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

      public double getCurrentTemperature() throws DeviceException
      Gets the current temperature by asking the actual LinkamCI
      Specified by:
      getCurrentTemperature in interface Temperature
      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:
      sendRamp in class TemperatureBase
      Parameters:
      which - the current ramp
    • isAtTargetTemperature

      public boolean isAtTargetTemperature() throws DeviceException
      Description copied from interface: Temperature
      Check the current temperature against the target temperature
      Specified by:
      isAtTargetTemperature in interface Temperature
      Overrides:
      isAtTargetTemperature in class TemperatureBase
      Returns:
      true if at the desired temperature
      Throws:
      DeviceException
    • hold

      public void hold()
      Description copied from interface: Temperature
      Stops running ramps or moving to temperature but holds the current temperature
      Specified by:
      hold in interface Temperature
    • temperatureUpdate

      public void temperatureUpdate()
      Called each time the poller goes round.
      Specified by:
      temperatureUpdate in class TemperatureBase
    • sendNotify

      public void sendNotify(String additionalData)
      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

      public void doStart() throws DeviceException
      Specified by:
      doStart in class TemperatureBase
      Throws:
      DeviceException
    • startNextRamp

      protected void startNextRamp() throws DeviceException
      Specified by:
      startNextRamp in class TemperatureBase
      Throws:
      DeviceException
    • doStop

      public void doStop()
      Specified by:
      doStop in class TemperatureBase
    • setAttribute

      public void setAttribute(String name, Object value)
      Overrides the DeviceBase method to provide commands for a liquid nitrogen pump
      Specified by:
      setAttribute in interface Device
      Overrides:
      setAttribute in class DeviceBase
      Parameters:
      name - the name of the attribute to set
      value - the attribute value
    • getAttribute

      public Object getAttribute(String name)
      Overrides the DeviceBase method to get current DSC dataset name.
      Specified by:
      getAttribute in interface Device
      Overrides:
      getAttribute in class ScannableMotionBase
      Parameters:
      name - the attribute name to get
      Returns:
      the attribute value
      See Also:
    • startTowardsTarget

      public void startTowardsTarget() throws DeviceException
      Description copied from class: TemperatureBase
      Should send hardware commands to start heating or cooling towards a single targetTemp
      Specified by:
      startTowardsTarget in class TemperatureBase
      Throws:
      DeviceException
    • startTowardsTarget

      public void startTowardsTarget(double targetTemp) throws DeviceException
      Throws:
      DeviceException
    • setHWLowerTemp

      protected void setHWLowerTemp(double lowerTemp) throws DeviceException
      Specified by:
      setHWLowerTemp in class TemperatureBase
      Parameters:
      lowerTemp -
      Throws:
      DeviceException
    • setHWUpperTemp

      protected void setHWUpperTemp(double upperTemp) throws DeviceException
      Specified by:
      setHWUpperTemp in class TemperatureBase
      Parameters:
      upperTemp -
      Throws:
      DeviceException
    • runRamp

      public void runRamp() throws DeviceException
      Description copied from class: TemperatureBase
      Run the ramp sequence.
      Specified by:
      runRamp in class TemperatureBase
      Throws:
      DeviceException
    • getBufferedData

      public List<double[]> getBufferedData()
    • readout

      public Object readout()
      Overrides:
      readout in class TemperatureBase