stoner_measurement.instruments.simulated.SimulatedMotorController¶
- class stoner_measurement.instruments.simulated.SimulatedMotorController(transport=None, protocol=None)[source]¶
Bases:
MotorControllerSimple simulated motor controller.
- has_reached_target_position(tolerance: float = 0.01) bool[source]¶
Return
Truewhen current and target positions are within tolerance.
- identify() str[source]¶
Return the instrument identification string (
*IDN?).Sends the standard IEEE 488.2
*IDN?query and returns the response. Instruments that do not support*IDN?should override this method.- Returns:
Identification string returned by the instrument.
- Return type:
(str)
- Raises:
ConnectionError – If the transport is not open.
Examples
>>> from stoner_measurement.instruments.transport import NullTransport >>> from stoner_measurement.instruments.protocol import ScpiProtocol >>> from stoner_measurement.instruments.base_instrument import BaseInstrument >>> t = NullTransport(responses=[b"ACME,Model1,SN001,v1.0\n"]) >>> instr = BaseInstrument(t, ScpiProtocol()) >>> instr.connect() >>> instr.identify() 'ACME,Model1,SN001,v1.0' >>> instr.disconnect()
- 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.
- 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.
- property status: MotorStatus¶
Return a consolidated motor status snapshot.