stoner_measurement.instruments.motor_controller.Motor

class stoner_measurement.instruments.motor_controller.Motor(*args, **kwargs)[source]

Bases: Protocol

Protocol describing the expected motor interface.

connect() → None[source]

Open the controller connection.

disconnect() → None[source]

Close the controller connection.

get_position() → float[source]

Return current angular position in degrees.

get_target_position() → float | None[source]

Return the current target angle in degrees, if known.

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

Return True when current and target positions are within tolerance.

identify() → str[source]

Return an identity string for the controller.

property is_connected: bool

Return True when the controller is connected.

is_moving() → bool[source]

Return True when the motor is moving.

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.

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

Move to an absolute angle in degrees.

set_acceleration(acceleration: float) → None[source]

Set travel acceleration in degrees per second squared.

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

Set the current position reference to a home angle.

set_velocity(velocity: float) → None[source]

Set travel velocity in degrees per second.