Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
hbridge.HBridge Class Reference

Methods to control slow laser switching devices. More...

Inheritance diagram for hbridge.HBridge:
Inheritance graph
[legend]
Collaboration diagram for hbridge.HBridge:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, kwargs)
 
def on_activate (self)
 Activate module.
 
def on_deactivate (self)
 Deactivate module.
 
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)
 Extend coil or move motor. More...
 
def switchOff (self, switchNumber)
 Retract coil ore move motor. 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')
 

Detailed Description

Methods to control slow laser switching devices.

Example config for copy-paste:

flipmirror_switch: module 'switches.hbridge.HBridge' interface 'ASRL1::INSTR'

Member Function Documentation

◆ getCalibration()

def hbridge.HBridge.getCalibration (   self,
  switchNumber,
  state 
)

Get calibration parameter for switch.

Parameters
intswitchNumber: number of switch for which to get calibration parameter
strswitchState: state ['On', 'Off'] for which to get calibration parameter
Returns
str: calibration parameter fir switch and state.

In this case, the calibration parameter is the time for which current is applied to the coil/motor for switching.

◆ getNumberOfSwitches()

def hbridge.HBridge.getNumberOfSwitches (   self)

Gives the number of switches connected to this hardware.

Returns
int: number of switches

◆ getSwitchState()

def hbridge.HBridge.getSwitchState (   self,
  switchNumber 
)

Gives state of switch.

Parameters
intswitchNumber: number of switch
Returns
bool: True if on, False if off, None on error

◆ getSwitchTime()

def hbridge.HBridge.getSwitchTime (   self,
  switchNumber 
)

Give switching time for switch.

Parameters
intswitchNumber: number of switch
Returns
float: time needed for switch state change

Coils typically switch faster than 0.5s, but safety first!

◆ setCalibration()

def hbridge.HBridge.setCalibration (   self,
  switchNumber,
  state,
  value 
)

Set calibration parameter for switch.

Parameters
intswitchNumber: number of switch for which to get calibration parameter
strswitchState: state ['On', 'Off'] for which to get calibration parameter
intvalue: calibration parameter to be set.
Returns
bool: True if success, False on error

◆ switchOff()

def hbridge.HBridge.switchOff (   self,
  switchNumber 
)

Retract coil ore move motor.

Parameters
intswitchNumber: number of switch to be switched
Returns
bool: True if suceeds, False otherwise

◆ switchOn()

def hbridge.HBridge.switchOn (   self,
  switchNumber 
)

Extend coil or move motor.

Parameters
intswitchNumber: number of switch to be switched
Returns
bool: True if suceeds, False otherwise

The documentation for this class was generated from the following file: