Skip to content

Add missing signals to SimMotor and create Motor Protocol #1102

@oliwenmandiamond

Description

@oliwenmandiamond

When using a motor in plans for testing and live, we want to specify a motor device but don't care about underlying implementation. At the moment, we're having to extend SimMotor to add missing signals and then use type: ignore when used in test plans. We should do the following things:

  • Add the following missing signals to SimMotor
def __init__(
    self,
    ...
    low_limit: float = float("-inf"),
    high_limit: float = float("inf"),
    max_velocity: float = 100,
    ...
):
    ...
    self.max_velocity = soft_signal_rw(float, max_velocity
    self.low_limit_travel = soft_signal_rw(float, low_limit)
    self.high_limit_travel = soft_signal_rw(float, high_limit)
   ...
  • Create a Motor protocol which defines the the base signals a device needs to define so that any device or plan can specify Motor protocol so it doesn't matter if a SimMotor or epics Motor
  • Possibly rename Motor to EpicsMotor?

Acceptance Criteria

  • Generic interface for Motor for plans and devices created so it doesn't matter on underlying implementation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions