Qudi
|
This is the Interface class to define the controls for the simple magnet hardware. More...
Public Member Functions | |
def | __init__ (self, config, kwargs) |
def | on_activate (self) |
Definition and initialisation of the GUI. | |
def | on_deactivate (self) |
Deactivate the module properly. | |
def | get_constraints (self) |
Retrieve the hardware constrains from the motor device. More... | |
def | move_rel (self, param_dict) |
Moves magnet in given direction (relative movement) More... | |
def | move_abs (self, param_dict) |
Moves magnet to absolute position (absolute movement) More... | |
def | abort (self) |
Stops movement of the stage. More... | |
def | get_pos (self, param_list=None) |
Gets current position of the magnet stage arms. More... | |
def | get_status (self, param_list=None) |
Get the status of the position. More... | |
def | calibrate (self, param_list=None) |
Calibrates the magnet stage. More... | |
def | get_velocity (self, param_list=None) |
Gets the current velocity for all connected axes. More... | |
def | set_velocity (self, param_dict=None) |
Write new value for velocity. More... | |
def | tell (self, param_dict=None) |
Send a command to the magnet. More... | |
def | ask (self, param_dict=None) |
Ask the magnet a question. More... | |
def | set_magnet_idle_state (self, magnet_idle=True) |
Set the magnet to couple/decouple to/from the control. More... | |
def | get_magnet_idle_state (self) |
Retrieve the current state of the magnet, whether it is idle or not. More... | |
def | initialize (self) |
![]() | |
def | __init__ (self, manager, name, config=None, callbacks=None, kwargs) |
Initialise Base class object and set up its state machine. More... | |
def | log (self) |
Returns a logger object. | |
def | is_module_threaded (self) |
Returns whether the module shall be started in a thread. | |
def | on_activate (self) |
Method called when module is activated. More... | |
def | on_deactivate (self) |
Method called when module is deactivated. More... | |
def | getStatusVariables (self) |
Return a dict of variable names and their content representing the module state for saving. More... | |
def | setStatusVariables (self, variableDict) |
Give a module a dict of variable names and their content representing the module state. More... | |
def | getConfiguration (self) |
Return the configration dictionary for this module. More... | |
def | get_connector (self, connector_name) |
Return module connected to the given named connector. More... | |
![]() | |
def | __new__ (cls, name, bases, attrs) |
Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More... | |
Additional Inherited Members | |
![]() | |
module_state | |
connectors | |
This is the Interface class to define the controls for the simple magnet hardware.
Example config for copy-paste:
magnet_dummy: module 'magnet.magnet_dummy.MagnetDummy'
def magnet_dummy.MagnetDummy.abort | ( | self | ) |
Stops movement of the stage.
def magnet_dummy.MagnetDummy.ask | ( | self, | |
param_dict = None |
|||
) |
Ask the magnet a question.
dict | param_dict: dictionary, which passes all the relevant parameters, which should be changed. Usage: {'axis_label': <the question="" string>="">}. 'axis_label' must correspond to a label given to one of the axis. |
def magnet_dummy.MagnetDummy.calibrate | ( | self, | |
param_list = None |
|||
) |
Calibrates the magnet stage.
dict | param_list: param_list: optional, if a specific calibration of an axis is desired, then the labels of the needed axis should be passed in the param_list. If nothing is passed, then all connected axis will be calibrated. |
After calibration the stage moves to home position which will be the zero point for the passed axis. The calibration procedure will be different for each stage.
def magnet_dummy.MagnetDummy.get_constraints | ( | self | ) |
Retrieve the hardware constrains from the motor device.
Provides all the constraints for each axis of a motorized stage (like total travel distance, velocity, ...) Each axis has its own dictionary, where the label is used as the identifier throughout the whole module. The dictionaries for each axis are again grouped together in a constraints dictionary in the form
{'<label_axis0>': axis0 }
where axis0 is again a dict with the possible values defined below. The possible keys in the constraint are defined here in the interface file. If the hardware does not support the values for the constraints, then insert just None. If you are not sure about the meaning, look in other hardware files to get an impression.
def magnet_dummy.MagnetDummy.get_magnet_idle_state | ( | self | ) |
Retrieve the current state of the magnet, whether it is idle or not.
def magnet_dummy.MagnetDummy.get_pos | ( | self, | |
param_list = None |
|||
) |
Gets current position of the magnet stage arms.
list | param_list: optional, if a specific position of an axis is desired, then the labels of the needed axis should be passed as the param_list. If nothing is passed, then from each axis the position is asked. |
def magnet_dummy.MagnetDummy.get_status | ( | self, | |
param_list = None |
|||
) |
Get the status of the position.
list | param_list: optional, if a specific status of an axis is desired, then the labels of the needed axis should be passed in the param_list. If nothing is passed, then from each axis the status is asked. |
def magnet_dummy.MagnetDummy.get_velocity | ( | self, | |
param_list = None |
|||
) |
Gets the current velocity for all connected axes.
dict | param_list: optional, if a specific velocity of an axis is desired, then the labels of the needed axis should be passed as the param_list. If nothing is passed, then from each axis the velocity is asked. |
def magnet_dummy.MagnetDummy.move_abs | ( | self, | |
param_dict | |||
) |
Moves magnet to absolute position (absolute movement)
dict | param_dict: dictionary, which passes all the relevant parameters, which should be changed. Usage: {'axis_label': <a-value>}. 'axis_label' must correspond to a label given to one of the axis. A smart idea would be to ask the position after the movement. |
def magnet_dummy.MagnetDummy.move_rel | ( | self, | |
param_dict | |||
) |
Moves magnet in given direction (relative movement)
dict | param_dict: dictionary, which passes all the relevant parameters, which should be changed. With get_constraints() you can obtain all possible parameters of that stage. According to this parameter set you have to pass a dictionary with keys that are called like the parameters from get_constraints() and assign a SI value to that. For a movement in x the dict should e.g. have the form: dict = { 'x' : 23 } where the label 'x' corresponds to the chosen axis label. |
A smart idea would be to ask the position after the movement.
def magnet_dummy.MagnetDummy.set_magnet_idle_state | ( | self, | |
magnet_idle = True |
|||
) |
Set the magnet to couple/decouple to/from the control.
bool | magnet_idle: if True then magnet will be set to idle and each movement command will be ignored from the hardware file. If False the magnet will react on movement changes of any kind. |
def magnet_dummy.MagnetDummy.set_velocity | ( | self, | |
param_dict = None |
|||
) |
Write new value for velocity.
dict | param_dict: dictionary, which passes all the relevant parameters, which should be changed. Usage: {'axis_label': <the-velocity-value>}. 'axis_label' must correspond to a label given to one of the axis. |
def magnet_dummy.MagnetDummy.tell | ( | self, | |
param_dict = None |
|||
) |
Send a command to the magnet.
dict | param_dict: dictionary, which passes all the relevant parameters, which should be changed. Usage: {'axis_label': <the command="" string>="">}. 'axis_label' must correspond to a label given to one of the axis. |