DAQ_Move modules¶
The DAQ_Move_base Class¶
-
class
pymodaq.daq_move.utility_classes.DAQ_Move_base(parent=None, params_state=None)[source]¶ The base class to be herited 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_stage instance (see daq_viewer_main module)) –
- params_state (Parameter instance (pyqtgraph) from which the module will get the initial settings (as defined in the preset)) –
Variables: - Move_Done_signal – pyqtSignal signal represented by a float. Is emitted each time the hardware reached the target position within the epsilon precision (see comon_parameters variable)
- controller – the object representing the hardware in the plugin. Used to access hardware functionality
- status – easydict instance to set information (str), controller object, stage object (if required) and initialized state (bool) to return to parent after initialization
- settings – Parameter 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
- params – class level attribute. List of dict used to create a Parameter object. Its definition on the class level enable the automatic update of the GUI settings when changing plugins (even in preset mode creation). To be populated on the plugin level as the base class does’t represents a real hardware
- is_multiaxes – class level attribute (bool). 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)
- current_position – (float) stores the current position after each call to the check_position in the child module
- target_position – (float) stores the target position the controller should reach within epsilon
-
emit_status(status)[source]¶ - Emit the statut signal from the given status parameter.The signal is sended to the gui to update the user interface.
Parameters Type Description status ordered dictionnary - dictionnary containing keys:
- info : string displaying various info
- controller: instance of the controller object in order to control other axes without the need to init the same controller twice
- stage: instance of the stage (axis or whatever) object
- initialized: boolean indicating if initialization has been done corretly
-
get_position_with_scaling(pos)[source]¶ Get the current position from the hardware with scaling conversion.
Parameters Type Description pos float the current position Returns: the computed position. Return type: float
-
move_done(position=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 Thread Command “update_settings”.
Parameters Type Description param instance of pyqtgraph parameter The parameter to be checked changes (parameter,change,infos)tuple list The (parameter,change,infos) list to be treated See also
DAQ_utils.ThreadCommand()
-
set_position_with_scaling(pos)[source]¶ Set the current position from the parameter and hardware with scaling conversion.
Parameters Type Description pos float the position to be setted Returns: the computed position. Return type: float
-
update_settings(settings_parameter_dict)[source]¶ Receive the settings_parameter signal from the param_tree_changed method and make hardware updates of mmodified values.
Arguments Type Description settings_parameter_dict dictionnary Dictionnary with the path of the parameter in hardware structure as key and the parameter name as element See also