stoner_measurement.plugins.command.set_position.SetPositionCommand¶
- class stoner_measurement.plugins.command.set_position.SetPositionCommand(parent=None)[source]¶
Bases:
SetEngineStateCommandMove the motor to an absolute angular position during a sequence.
Use this command to set the target angle of the active motor controller. If necessary, the command connects the preferred configured controller before requesting the move. It can either continue after the first state read or hold sequence execution until the motor engine reports that the target has been reached.
The configuration tab provides Direction, Setpoint expression, and Wait expression controls. Direction can be clockwise, counter-clockwise, or the shortest route. The setpoint is in degrees and may be a number or an expression evaluated in the sequence namespace when the step runs. The wait expression defaults to
True.When execution finishes, the command publishes Position, Target Position, Angular Rate, At Target, and Stable scalar outputs from the final controller state. Boolean outputs are represented as
1.0or0.0.- Variables:
direction (MotorMoveDirection) – Direction used for the absolute move. Defaults to
MotorMoveDirection.SHORTEST.setpoint_expr (str) – Numeric expression for the target position in degrees. Defaults to
"0.0".wait_expr (str) – Boolean expression controlling whether execution waits for the target position. Defaults to
"True".instance_name (str) – Inherited sequence-instance name used to identify the command and its published scalar outputs.
sequence_engine (SequenceEngine | None) – Inherited reference to the sequence engine and its live namespace.
comment (str) – Inherited optional note displayed beside this step.
- Keyword Parameters:
parent (QObject | None) – Optional Qt parent object.
Examples
With an instance named
set_positionin the sequence, use the QtConsole to inspect or edit it before running. Substitute your instance name if different; result data reflects completed steps:from stoner_measurement.instruments.motor_controller import ( MotorMoveDirection, ) set_position.direction = MotorMoveDirection.SHORTEST set_position.setpoint_expr = "sample_angle + 90"
- property controller_features: frozenset[str]¶
Return controller feature flags required by this plugin.
- property output_names: tuple[str, ...]¶
Names of scalar values captured from the final engine snapshot.
- setpoint_suffix = '°'¶