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

AbstractActuator(name)

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

init()[source]#

Initialise actuator_name, username, read_only and default_value properties.

re_emit_values()[source]#

Update values for all internal attributes

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

update_value(value=None)[source]#

Check if the value has changed. Emits signal valueChanged. :param value: value

validate_value(value)[source]#

Check if the value is within limits. :param value: value :type value: numerical

Returns:

True if within the limits

Return type:

(bool)