MockControlOpenLoop¶
- class lsst.ts.m2com.MockControlOpenLoop¶
Bases:
object
Mock open-loop control.
Attributes¶
- open_loop_max_limit_is_enabled
bool
The maximum limit of open-loop control is enabled or not.
- is_running
bool
The open-loop control is running or not.
Methods Summary
get_steps_to_move
(steps)Get the steps to move.
is_actuator_force_out_limit
(actuator_force)The actuator force is out of limit or not.
pause
()Pause the movement.
resume
()Resume the movement.
start
(actuators, displacement, unit)Start the movement.
stop
()Stop the movement.
Methods Documentation
- get_steps_to_move(steps: int) ndarray[Any, dtype[int64]] ¶
Get the steps to move.
If the requested displacement is done or the actuator force is out of limit, the value of self.is_running will change to False.
Parameters¶
- steps
int
Absolute steps (>=0) to move. The internal calculation will consider the direction of target displacement by itself.
Returns¶
- actuator_steps
numpy.ndarray
[int
] 78 actuator steps.
Raises¶
RuntimeError
When the actuators are not running.
ValueError
When the steps is less than 0.
- steps
- is_actuator_force_out_limit(actuator_force: ndarray[Any, dtype[float64]]) tuple[bool, list[int], list[int]] ¶
The actuator force is out of limit or not. The result will depend on self.open_loop_max_limit_is_enabled.
Notes¶
If the force is out of limit, stop the running of open-loop control.
Parameters¶
- actuator_force
numpy.ndarray
Actuator forces in Newton.
Returns¶
- is_triggered
bool
True if the actuator force is out of limit. Otherwise, False.
- limit_switch_retract
list
Triggered retracted limit switches.
- limit_switch_extend
list
Triggered extended limit switches.
- actuator_force
- pause() None ¶
Pause the movement.
- start(actuators: list[int], displacement: int | float, unit: ActuatorDisplacementUnit) None ¶
Start the movement.
Parameters¶
- actuators
list [int]
Actuator IDs to do the movement.
- displacement
int
orfloat
Displacement to move.
- unitenum
ActuatorDisplacementUnit
Unit of the displacement.
Raises¶
RuntimeError
When the actuators are moving.
ValueError
When no actuators are selected.
- actuators
- stop() None ¶
Stop the movement.
- open_loop_max_limit_is_enabled