mxcubecore.HardwareObjects.abstract.AbstractActuator#
Abstract Actuator class. Defines the set/update value, get/set/update limits and validate_value methods and the get_value and _set_value abstract methods. Initialises the actuator_name, username, read_only and default_value properties. Emits signals valueChanged and limitsChanged.
Classes
|
Abstract actuator |
- class mxcubecore.HardwareObjects.abstract.AbstractActuator.AbstractActuator(name)[source]#
Bases:
HardwareObject
Abstract actuator
- force_emit_signals()[source]#
Forces to emit all signals.
Method is called from gui Do not call it within HWR
- get_limits()[source]#
Return actuator low and high limits. :returns: two elements (low limit, high limit) tuple. :rtype: (tuple)
- abstract get_value()[source]#
Read the actuator position. :returns: Actuator position. :rtype: value
- set_limits(limits)[source]#
Set actuator low and high limits. Emits signal limitsChanged. :param limits: two elements (low limit, high limit) tuple. :type limits: tuple
- Raises:
ValueError – Attempt to set limits for read-only Actuator.
- set_value(value, timeout=0)[source]#
Set actuator to value. :param value: target value :param timeout: optional - timeout [s],
- If timeout == 0: return at once and do not wait
(default);
if timeout is None: wait forever.
- Raises:
ValueError – Invalid value or attemp to set read only actuator.
RuntimeError – Timeout waiting for status ready # From wait_ready
- update_limits(limits=None)[source]#
Check if the limits have changed. Emits signal limitsChanged. :param limits: two elements tuple (low limit, high limit). :type limits: tuple