stoner_measurement.instruments.motor_controller.MotorController

class stoner_measurement.instruments.motor_controller.MotorController(transport: BaseTransport, protocol: BaseProtocol)[source]

Bases: BaseInstrument

Abstract base class for motor controller drivers.

connect() → None[source]

Open the controller connection and verify identity.

abstractmethod get_position() → float[source]

Return current angular position in degrees.

abstractmethod get_target_position() → float | None[source]

Return the current target angle in degrees, if known.

abstractmethod has_reached_target_position(tolerance: float = 0.01) → bool[source]

Return True when current and target positions are within tolerance.

abstractmethod is_moving() → bool[source]

Return True when the motor is moving.

abstractmethod move_home(direction: MotorMoveDirection = MotorMoveDirection.CLOCKWISE) → None[source]

Move to the configured home position.

move_relative(angle: float, direction: MotorMoveDirection = MotorMoveDirection.CLOCKWISE) → None[source]

Move by angle degrees in direction using the absolute move API.

abstractmethod move_to_angle(angle: float, direction: MotorMoveDirection = MotorMoveDirection.CLOCKWISE) → None[source]

Move to an absolute angle in degrees.

return_to_local() → None[source]

Return the controller front panel to local/manual operation.

abstractmethod set_acceleration(acceleration: float) → None[source]

Set travel acceleration in degrees per second squared.

abstractmethod set_home(angle: float = 0.0) → None[source]

Set the current position reference to a home angle.

abstractmethod set_velocity(velocity: float) → None[source]

Set travel velocity in degrees per second.

property status: MotorStatus

Return a consolidated motor status snapshot.

wait_for_target_position(*, timeout: float = 120.0, poll_period: float = 0.05, tolerance: float = 0.01) → None[source]

Wait until target position is reached or timeout expires.