|
Qudi
|
This class is implements communication with the Radiant Dyes flip mirror driver through pyVISA. More...


Public Member Functions | |
| def | __init__ (self, config, kwargs) |
| Creae flip mirror control module. More... | |
| def | on_activate (self) |
| Prepare module, connect to hardware. | |
| def | on_deactivate (self) |
| Disconnect from hardware on deactivation. | |
| def | getNumberOfSwitches (self) |
| Gives the number of switches connected to this hardware. More... | |
| def | getSwitchState (self, switchNumber) |
| Gives state of switch. More... | |
| def | getCalibration (self, switchNumber, state) |
| Get calibration parameter for switch. More... | |
| def | setCalibration (self, switchNumber, state, value) |
| Set calibration parameter for switch. More... | |
| def | switchOn (self, switchNumber) |
| Turn the flip mirror to vertical position. More... | |
| def | switchOff (self, switchNumber) |
| Turn the flip mirror to horizontal position. More... | |
| def | getSwitchTime (self, switchNumber) |
| Give switching time for switch. More... | |
Public Member Functions inherited from core.module.BaseMixin | |
| 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... | |
Public Member Functions inherited from core.module.ModuleMeta | |
| def | __new__ (cls, name, bases, attrs) |
| Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More... | |
Public Attributes | |
| lock | |
| rm | |
| inst | |
Public Attributes inherited from core.module.BaseMixin | |
| module_state | |
| connectors | |
Static Public Attributes | |
| serial_interface = ConfigOption('interface', 'ASRL1::INSTR', missing='warn') | |
This class is implements communication with the Radiant Dyes flip mirror driver through pyVISA.
Example config for copy-paste:
flipmirror_switch: module 'switches.flipmirror.FlipMirror' interface 'ASRL1::INSTR'
| def flipmirror.FlipMirror.__init__ | ( | self, | |
| config, | |||
| kwargs | |||
| ) |
Creae flip mirror control module.
| object | manager: reference to module manager |
| str | name: unique module name |
| dict | config; configuration parameters in a dict |
| dict | kwargs: aditional parameters in a dict |
| def flipmirror.FlipMirror.getCalibration | ( | self, | |
| switchNumber, | |||
| state | |||
| ) |
Get calibration parameter for switch.
| int | switchNumber: number of switch for which to get calibration parameter |
| str | switchState: state ['On', 'Off'] for which to get calibration parameter |
In this case, the calibration parameter is a integer number that says where the horizontal and vertical position of the flip mirror is in the 16 bit PWM range of the motor driver. The number is returned as a string, not as an int, and needs to be converted.
| def flipmirror.FlipMirror.getNumberOfSwitches | ( | self | ) |
Gives the number of switches connected to this hardware.
| def flipmirror.FlipMirror.getSwitchState | ( | self, | |
| switchNumber | |||
| ) |
Gives state of switch.
| int | switchNumber: number of switch |
| def flipmirror.FlipMirror.getSwitchTime | ( | self, | |
| switchNumber | |||
| ) |
Give switching time for switch.
| int | switchNumber: number of switch |
| def flipmirror.FlipMirror.setCalibration | ( | self, | |
| switchNumber, | |||
| state, | |||
| value | |||
| ) |
Set calibration parameter for switch.
| int | switchNumber: number of switch for which to get calibration parameter |
| str | switchState: state ['On', 'Off'] for which to get calibration parameter |
| int | value: calibration parameter to be set. |
| def flipmirror.FlipMirror.switchOff | ( | self, | |
| switchNumber | |||
| ) |
Turn the flip mirror to horizontal position.
| int | switchNumber: number of switch to be switched |
| def flipmirror.FlipMirror.switchOn | ( | self, | |
| switchNumber | |||
| ) |
Turn the flip mirror to vertical position.
| int | switchNumber: number of switch to be switched |
1.8.13