pcdsdevices.interface.MvInterface
- class pcdsdevices.interface.MvInterface(*args, **kwargs)
Interface layer to attach to a positioner for motion shortcuts.
Defines common shortcuts that the beamline scientists like for moving things on the command line. There is no need for these in a scripting environnment, but this is a safe space for implementing move features that would otherwise be disruptive to running scans and writing higher-level applications.
Methods
- camonitor()
Shows a live-updating motor position in the terminal.
This will be the value that is returned by the
position
attribute.This method ends cleanly at a ctrl+c or after a call to
end_monitor_thread()
, which may be useful when this is called in a background thread.
- end_monitor_thread()
Stop a
camonitor()
orwm_update()
that is running in another thread.
- move(*args, **kwargs)
- mv(position, timeout=None, wait=False, log=True)
Absolute move to a position.
- Parameters:
position – Desired end position.
timeout (float, optional) – If provided, the mover will throw an error if motion takes longer than timeout to complete. If omitted, the mover’s default timeout will be use.
wait (bool, optional) – If
True
, wait for motion completion before returning. Defaults toFalse
.log (bool, optional) – If
True
, logs the move at INFO level.
- post_elog_status()
Post device status to the primary elog, if possible.
- screen()
Open a screen for controlling the device.
Default behavior is the typhos screen, but this method can be overridden for more specialized screens.
- wait(timeout=None)
- wm()
Get the mover’s current positon (where motor).
- wm_update()
Shows a live-updating motor position in the terminal.
This will be the value that is returned by the
position
attribute.This method ends cleanly at a ctrl+c or after a call to
end_monitor_thread()
, which may be useful when this is called in a background thread.