Interface SampleChanger

All Superinterfaces:
BlockedPositions, Configurable, Device, Findable, gda.observable.IObservable, Stoppable
All Known Subinterfaces:
IJActorSampleChanger
All Known Implementing Classes:
ActorSampleChanger, DummyJActorSampleChanger, DummyJCameramanSampleChanger, DummySampleChanger, JActorSampleChanger, OscarSampleChanger, PlateSampleChangerBase, SampleChangerBase

public interface SampleChanger extends Device, Stoppable, BlockedPositions
Interface for automated sample exchange systems. It is assumed that samples are identified by holder and position numbers.

Sample changers also assumed to be able to automatically centre their sample via control of an XYZ sample mounting stage.

Sample changers can be enabled/disabled at runtime to allow for switching between manual and automated sample loading. Implementations should set the state to INITIALISING while the robot is initialising, and go back to the IDLE state when this is finished. If an error occurs, the ERROR state should be used.

  • Field Details

    • ATTRIBUTE_IS_SOAKING

      static final String ATTRIBUTE_IS_SOAKING
      See Also:
    • APPROVERNAME

      static final String APPROVERNAME
      The name of the ActionApprover object located in the top-level Jython namespace which is used to test if sample changer movements are possible due to hardware interlocks
      See Also:
    • EMPTY

      static final int EMPTY
      Value to be used for the holder number or sample number if no sample is loaded.
      See Also:
  • Method Details

    • getBarcode

      String getBarcode() throws DeviceException
      For SampleChangers which are set to read barcodes, returns as a string the barcode of the sample mounted during the last load operation.
      Returns:
      the barcode of the currently mounted sample
      Throws:
      DeviceException
    • getHolder

      int getHolder() throws DeviceException
      Returns the number of the holder of the current loaded sample.
      Returns:
      int
      Throws:
      DeviceException
    • getTypeString

      String getTypeString() throws DeviceException
      Returns a string of the Java class of the type of this sample changer.
      Returns:
      java.lang.String
      Throws:
      DeviceException
    • getNumberOfHolders

      int getNumberOfHolders() throws DeviceException
      Returns the number of holders (pucks) over all available dewars to load from.
      Returns:
      int
      Throws:
      DeviceException
    • getHolderType

      String getHolderType() throws DeviceException
      Returns a string representing the type of puck in use
      Returns:
      string
      Throws:
      DeviceException
    • getReadingBarcodes

      boolean getReadingBarcodes() throws DeviceException
      Returns:
      true if the samplechanger will read barcodes during loading.
      Throws:
      DeviceException
    • getSample

      int getSample() throws DeviceException
      Get the position in its holder of the currently loaded sample.
      Returns:
      int
      Throws:
      DeviceException
    • getSamplesInHolder

      int getSamplesInHolder(int holder) throws DeviceException
      Returns the number of samples in the specified holder (puck).
      Parameters:
      holder - the holder number (starting from 1)
      Returns:
      the number of samples in that holder
      Throws:
      DeviceException
    • isCentreRequired

      boolean isCentreRequired() throws DeviceException
      Returns true if the user needs to centre the crystal.
      Throws:
      DeviceException
    • isEnabled

      boolean isEnabled() throws DeviceException
      Returns true if this sample changer is in use for loading samples.
      Returns:
      boolean
      Throws:
      DeviceException
    • setNumberOfHolders

      void setNumberOfHolders(int numberOfHolders) throws DeviceException
      Sets the number of total holders (pucks/magazines/plates etc.) that the sample changer can load from
      Parameters:
      numberOfHolders -
      Throws:
      DeviceException
    • setHolderType

      void setHolderType(String puckType) throws DeviceException
      Sets a string representing the type of puck in use e.g. "Rigaku"
      Parameters:
      puckType -
      Throws:
      DeviceException
    • setSamplesInHolder

      void setSamplesInHolder(int holder, int samples) throws DeviceException
      Sets the number of samples in the specified holder. Used when changing the puck type mid-experiment.
      Parameters:
      holder - the holder number (starting from 1)
      samples - the number of samples in that holder
      Throws:
      DeviceException
    • isSampleLoaded

      boolean isSampleLoaded() throws DeviceException
      Returns true if a sample is in the sample position on the beamline.
      Returns:
      boolean
      Throws:
      DeviceException
    • isSampleLoaded

      boolean isSampleLoaded(int holder, int sample) throws DeviceException
      Returns true if loaded sample has the specified index.
      Parameters:
      holder - the holder index (≥1)
      sample - the sample index (≥1)
      Returns:
      boolean
      Throws:
      DeviceException
    • load

      void load(int holder, int sample) throws DeviceException
      Load a sample.
      Parameters:
      holder - the holder number (≥1)
      sample - the sample number (≥1)
      Throws:
      DeviceException
    • getStatus

      Returns:
      the current status of the sample changer as a SampleChangerStatus object
      Throws:
      DeviceException
    • setCentreRequired

      void setCentreRequired(boolean centringRequired) throws DeviceException
      Sets the centre required flag. This enables the detector to be told when manual centring has been successfully completed.
      Parameters:
      centringRequired -
      Throws:
      DeviceException
    • setLoadedSample

      void setLoadedSample(int holder, int sample) throws DeviceException
      Sets the holder and sample numbers of the loaded sample. To be used if a sample is manually mounted onto the sample changer.
      Parameters:
      holder - the holder number
      sample - the sample number
      Throws:
      DeviceException
    • setEnabled

      void setEnabled(boolean isEnabled) throws DeviceException
      Sets if the sample changer is currently in use.
      Parameters:
      isEnabled -
      Throws:
      DeviceException
    • setReadingBarcodes

      void setReadingBarcodes(boolean readDuringLoad) throws DeviceException
      Sets whether to read barcodes during each load operation
      Parameters:
      readDuringLoad -
      Throws:
      DeviceException
    • stop

      void stop() throws DeviceException
      Description copied from interface: Stoppable
      Stops the current operation.
      Specified by:
      stop in interface Stoppable
      Throws:
      DeviceException
    • unload

      void unload() throws DeviceException
      Unloads the current sample without loading a new one.
      Throws:
      DeviceException
    • waitForIdle

      boolean waitForIdle() throws DeviceException
      Returns when the sample changer has finished its current operation.
      Returns:
      true if the current operation was successful
      Throws:
      DeviceException
    • setActionApproverName

      void setActionApproverName(String actionApproverName) throws DeviceException
      Parameters:
      actionApproverName -
      Throws:
      DeviceException
    • getActionApproverName

      String getActionApproverName() throws DeviceException
      Returns:
      name of the action approver object in the top-level Jython namespace
      Throws:
      DeviceException