pymodaq.control_modules.move_utility_classes.params

Built-in mutable sequence.

8.1.5. The DAQ_Move Class

This documentation highlights the useful entry and output points that you may use in your applications.

8.1.6. The DAQ_Move UI class

This object is the User Interface of the DAQ_Viewer, allowing easy access to all of the DAQ_Viewer functionnalities in a generic interface.

8.1.7. The DAQ_Move Plugin Class

This object is the base class from which all actuator plugins should inherit. It exposes a few methods, attributes and signal that could be useful to understand.

class pymodaq.control_modules.move_utility_classes.DAQ_Move_base(parent: Optional[DAQ_Move_Hardware] = None, params_state: Optional[dict] = None)[source]

The base class to be inherited by all actuator modules

This base class implements all necessary parameters and methods for the plugin to communicate with its parent (the DAQ_Move module)

Parameters
  • parent (DAQ_Move_Hardware) –

  • params_state (Parameter) – pyqtgraph Parameter instance from which the module will get the initial settings (as defined in the preset)

move_done_signal

signal represented by a float. Is emitted each time the hardware reached the target position within the epsilon precision (see comon_parameters variable)

Type

Signal

controller

the object representing the hardware in the plugin. Used to access hardware functionality

Type

object

settings
instance representing the hardware settings defined from the params attribute. Modifications on the GUI settings

will be transferred to this attribute. It stores at all times the current state of the hardware/plugin settings

Type

Parameter

params

Its definition on the class level enable the automatic update of the GUI settings when changing plugins (even in managers mode creation). To be populated on the plugin level as the base class does’t represents a real hardware

Type

List of dict used to create a Parameter object.

is_multiaxes

class level attribute. Defines if the plugin controller controls multiple axes. If True, one has to define a Master instance of this plugin and slave instances of this plugin (all sharing the same controller_ID parameter)

Type

bool

current_value

stores the current position after each call to the get_actuator_value in the plugin

Type

DataActuator

target_value

stores the target position the controller should reach within epsilon

Type

DataActuator

Attributes
axis_name

Get/Set the current axis using its string identifier

axis_names

Get/Set the names of all axes controlled by this instrument plugin

axis_value

Get the current value selected from the current axis

controller_units

Get/Set the units of this plugin

current_position
current_value
ispolling

Get/Set the polling status

target_position
target_value

Methods

check_bound(position)

Check if the current position is within the software bounds

commit_settings(param)

to subclass to transfer parameters to hardware

emit_status(status)

Emit the status_sig signal with the given status ThreadCommand back to the main GUI.

emit_value(pos)

Convenience method to emit the current actuator value back to the UI

get_position_with_scaling(pos)

Get the current position from the hardware with scaling conversion.

ini_attributes()

To be subclassed, in order to init specific attributes needed by the real implementation

ini_stage_init([old_controller, new_controller])

Manage the Master/Slave controller issue

move_done([position])

Emit a move done signal transmitting the float position to hardware.

poll_moving()

Poll the current moving.

send_param_status(param, changes)

Send changes value updates to the gui to update consequently the User Interface

set_position_relative_with_scaling(pos)

Set the scaled positions in case of relative moves

set_position_with_scaling(pos)

Set the current position from the parameter and hardware with scaling conversion.

update_settings(settings_parameter_dict)

Receive the settings_parameter signal from the param_tree_changed method and make hardware updates of modified values.

check_target_reached

commit_common_settings

get_actuator_value

move_abs

move_done_signal

move_home

move_rel

check_bound(position: DataActuator) DataActuator[source]

Check if the current position is within the software bounds

Return the new position eventually coerced within the bounds

commit_settings(param: Parameter)[source]

to subclass to transfer parameters to hardware

emit_status(status: ThreadCommand)[source]

Emit the status_sig signal with the given status ThreadCommand back to the main GUI.

emit_value(pos: DataActuator)[source]

Convenience method to emit the current actuator value back to the UI

get_position_with_scaling(pos: DataActuator) DataActuator[source]

Get the current position from the hardware with scaling conversion.

ini_attributes()[source]

To be subclassed, in order to init specific attributes needed by the real implementation

ini_stage_init(old_controller=None, new_controller=None)[source]

Manage the Master/Slave controller issue

First initialize the status dictionary Then check whether this stage is controlled by a multiaxe controller (to be defined for each plugin)

if it is a multiaxes controller then: * if it is Master: init the controller here * if it is Slave: use an already initialized controller (defined in the preset of the dashboard)

Parameters
  • old_controller (object) – The particular object that allow the communication with the hardware, in general a python wrapper around the hardware library. In case of Slave this one comes from a previously initialized plugin

  • new_controller (object) – The particular object that allow the communication with the hardware, in general a python wrapper around the hardware library. In case of Master it is the new instance of your plugin controller

move_done(position: Optional[DataActuator] = None)[source]
Emit a move done signal transmitting the float position to hardware.
The position argument is just there to match some signature of child classes.

Arguments

Type

Description

position

float

The position argument is just there to match some signature of child classes

poll_moving()[source]

Poll the current moving. In case of timeout emit the raise timeout Thread command.

See also

DAQ_utils.ThreadCommand, move_done

send_param_status(param, changes)[source]

Send changes value updates to the gui to update consequently the User Interface

The message passing is made via the ThreadCommand “update_settings”.

set_position_relative_with_scaling(pos: DataActuator) DataActuator[source]

Set the scaled positions in case of relative moves

set_position_with_scaling(pos: DataActuator) DataActuator[source]

Set the current position from the parameter and hardware with scaling conversion.

update_settings(settings_parameter_dict)[source]

Receive the settings_parameter signal from the param_tree_changed method and make hardware updates of modified values.

property axis_name: Union[str, object]

Get/Set the current axis using its string identifier

property axis_names: Union[List, Dict]

Get/Set the names of all axes controlled by this instrument plugin

Return type

List of string or dictionary mapping names to integers

property axis_value: object

Get the current value selected from the current axis

property controller_units

Get/Set the units of this plugin

property ispolling

Get/Set the polling status