Package gda.device

Interface Motor

All Superinterfaces:
Configurable, Device, Findable, gda.observable.IObservable
All Known Implementing Classes:
DummyMotor, EpicsMotor, EpicsMotorDecorator, EpicsMotorDirect, EpicsReadyMotor, FeedbackControlledEpicsMotor, MotorBase, MotorIocDecorator, PiezoEpicsMotor, SimpleMotor, ThreadlessDummyMotor

public interface Motor extends Device
Interface to control motors of all types. Operations which need amounts, for example moveTo, are specified in terms of steps (which can be non-integral for some types of motor).
  • Field Details

  • Method Details

    • moveBy

      void moveBy(double steps) throws MotorException
      Moves the motor by the specified number of steps
      Parameters:
      steps - the number of steps to move by
      Throws:
      MotorException
    • moveTo

      void moveTo(double steps) throws MotorException
      Moves the motor to the specified position in steps
      Parameters:
      steps - the number of steps to move to
      Throws:
      MotorException
    • moveContinuously

      void moveContinuously(int direction) throws MotorException
      Moves the motor in a continuous mode
      Parameters:
      direction - direction to move in
      Throws:
      MotorException
    • setPosition

      void setPosition(double steps) throws MotorException
      Sets the current position of the motor
      Parameters:
      steps - the position to be set as current
      Throws:
      MotorException
    • getPosition

      double getPosition() throws MotorException
      Gets the current position of the motor
      Returns:
      the current position
      Throws:
      MotorException
    • setSpeed

      void setSpeed(double speed) throws MotorException
      Sets the speed of the motor
      Parameters:
      speed - the speed
      Throws:
      MotorException
    • setSpeedLevel

      void setSpeedLevel(int level) throws MotorException
      Sets the speed level of the motor
      Parameters:
      level - one of a range of possible levels eg slow, medium, fast
      Throws:
      MotorException
    • getSpeed

      double getSpeed() throws MotorException
      Gets the current speed setting of the motor
      Returns:
      the speed in steps per second
      Throws:
      MotorException
    • getTimeToVelocity

      double getTimeToVelocity() throws MotorException
      Returns this motor's time to velocity.
      Throws:
      MotorException
    • setTimeToVelocity

      void setTimeToVelocity(double timeToVelocity) throws MotorException
      Sets this motor's time to velocity.
      Throws:
      MotorException
    • stop

      void stop() throws MotorException
      Brings the motor to a controlled stop if possible
      Throws:
      MotorException
    • panicStop

      void panicStop() throws MotorException
      Brings the motor to an uncontrolled stop if possible
      Throws:
      MotorException
    • getStatus

      MotorStatus getStatus() throws MotorException
      Gets the state of the motor
      Returns:
      a value from the MotorStatus enum
      Throws:
      MotorException
    • correctBacklash

      void correctBacklash() throws MotorException
      Do backlash correction
      Throws:
      MotorException
    • isMoving

      boolean isMoving() throws MotorException
      Returns whether or not motor is actually moving
      Returns:
      true if moving
      Throws:
      MotorException
    • isHomeable

      boolean isHomeable() throws MotorException
      Returns whether or not motor can home
      Returns:
      true if homeable
      Throws:
      MotorException
    • isHomed

      boolean isHomed() throws MotorException
      Returns whether or not motor is already homed
      Returns:
      true if homed
      Throws:
      MotorException
    • home

      void home() throws MotorException
      Moves the motor to a repeatable starting location
      Throws:
      MotorException
    • setSoftLimits

      void setSoftLimits(double minPosition, double maxPosition) throws MotorException
      Sets the soft limits of the motor itself (i.e. NOT limits in our software)
      Parameters:
      minPosition - minimum software limit
      maxPosition - maximum software limit
      Throws:
      MotorException
    • getMinPosition

      double getMinPosition() throws MotorException
      Gets the minimum or lower soft limits of the motor itself (i.e. NOT limits cached in GDA software). By convention return NaN if not set.
      Returns:
      the lower soft limit of the motor
      Throws:
      MotorException
    • setMinPosition

      void setMinPosition(double minPosition) throws MotorException
      Set the lower soft limit of the motor
      Parameters:
      minPosition - the lower limit to set
      Throws:
      MotorException
    • getMaxPosition

      double getMaxPosition() throws MotorException
      Gets the maximum or upper soft limits of the motor itself (i.e. NOT limits cached in GDA software). By convention return NaN if not set.
      Returns:
      the upper soft limit of the motor
      Throws:
      MotorException
    • setMaxPosition

      void setMaxPosition(double maxPosition) throws MotorException
      Set the upper soft limit of the motor
      Parameters:
      maxPosition - upper limit to set
      Throws:
      MotorException
    • isLimitsSettable

      boolean isLimitsSettable() throws MotorException
      Returns whether or not limits are settable (in the motor itself).
      Returns:
      true if the limits are settable.
      Throws:
      MotorException
    • isInitialised

      boolean isInitialised() throws MotorException
      Gets initialisition state of the motor with respect to its connection to low level device service e.g. EPICS server. This value does not imply that the motors initial values are set (or not set).
      Returns:
      return true if motor is already initialised.
      Throws:
      MotorException
    • getRetryDeadband

      double getRetryDeadband() throws MotorException
      return the position tolerance or accuracy
      Returns:
      positioning tolerance
      Throws:
      MotorException
    • getMotorResolution

      double getMotorResolution() throws MotorException
      Throws:
      MotorException
    • getUserOffset

      double getUserOffset() throws MotorException
      Returns:
      the user offset set on the motor
      Throws:
      MotorException
    • waitWhileStatusBusy

      MotorStatus waitWhileStatusBusy() throws InterruptedException, DeviceException
      Blocks while the motors status is Busy
      Returns:
      status after being busy
      Throws:
      InterruptedException
      DeviceException
    • getUnitString

      String getUnitString() throws MotorException
      Returns:
      unit as a String
      Throws:
      MotorException