Qudi
Public Member Functions | Public Attributes | List of all members
mw_source_smr.MicrowaveSMR Class Reference

The hardware control for the device Rohde and Schwarz of type SMR. More...

Inheritance diagram for mw_source_smr.MicrowaveSMR:
Inheritance graph
[legend]
Collaboration diagram for mw_source_smr.MicrowaveSMR:
Collaboration graph
[legend]

Public Member Functions

def on_activate (self)
 Initialisation performed during activation of the module. More...
 
def on_deactivate (self)
 Deinitialisation performed during deactivation of the module.
 
def get_limits (self)
 Retrieve the limits of the device. More...
 
def off (self)
 Switches off any microwave output. More...
 
def get_status (self)
 Get the current status of the MW source, i.e. More...
 
def get_power (self)
 Gets the microwave output power. More...
 
def get_frequency (self)
 Gets the frequency of the microwave output. More...
 
def cw_on (self)
 Switches on cw microwave output. More...
 
def set_cw (self, frequency=None, power=None)
 Configures the device for cw-mode and optionally sets frequency and/or power. More...
 
def list_on (self)
 
def set_list (self, frequency=None, power=None)
 Configures the device for list-mode and optionally sets frequencies and/or power. More...
 
def reset_listpos (self)
 Reset of MW List Mode position to start from first given frequency. More...
 
def sweep_on (self)
 Switches on the sweep mode. More...
 
def set_sweep (self, start=None, stop=None, step=None, power=None)
 
def reset_sweeppos (self)
 Reset of MW sweep mode position to start (start frequency) More...
 
def set_ext_trigger (self, pol, timing)
 Set the external trigger for this device with proper polarization. More...
 
def turn_AM_on (self, depth)
 Turn on the Amplitude Modulation mode. More...
 
def turn_AM_off (self)
 Turn off the Amlitude Modulation Mode. More...
 
def trigger (self)
 Trigger the next element in the list or sweep mode programmatically. More...
 
def reset_device (self)
 Resets the device and sets the default values. 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

 rm
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Detailed Description

The hardware control for the device Rohde and Schwarz of type SMR.

The command structure has been tested for type SMR20. Not tested on the device types SMR27, SMR30, SMR40

For additional information concerning the commands to communicate via the GPIB connection through visa, please have a look at:

http://cdn.rohde-schwarz.com/pws/dl_downloads/dl_common_library/dl_manuals/gb_1/s/smr_1/smr_20-40.pdf

Example config for copy-paste:

mw_source_smr: module 'microwave.mw_source_smr.MicrowaveSMR' gpib_address 'GPIB0::28::INSTR' gpib_timeout 10

Member Function Documentation

◆ cw_on()

def mw_source_smr.MicrowaveSMR.cw_on (   self)

Switches on cw microwave output.

Returns
int: error code (0:OK, -1:error)

Must return AFTER the device is actually running.

◆ get_frequency()

def mw_source_smr.MicrowaveSMR.get_frequency (   self)

Gets the frequency of the microwave output.

Returns
float|list: frequency(s) currently set for this device in Hz

Returns single float value if the device is in cw mode. Returns list like [start, stop, step] if the device is in sweep mode. Returns list of frequencies if the device is in list mode.

◆ get_limits()

def mw_source_smr.MicrowaveSMR.get_limits (   self)

Retrieve the limits of the device.

Returns
: object MicrowaveLimits: Serves as a container for the limits of the microwave device.

◆ get_power()

def mw_source_smr.MicrowaveSMR.get_power (   self)

Gets the microwave output power.

Returns
float: the power set at the device in dBm

◆ get_status()

def mw_source_smr.MicrowaveSMR.get_status (   self)

Get the current status of the MW source, i.e.

the mode (cw, list or sweep) and the output state (stopped, running).

Returns
str, bool: mode ['cw', 'list', 'sweep'], is_running [True, False]

◆ off()

def mw_source_smr.MicrowaveSMR.off (   self)

Switches off any microwave output.

Must return AFTER the device is actually stopped.

Returns
int: error code (0:OK, -1:error)

◆ on_activate()

def mw_source_smr.MicrowaveSMR.on_activate (   self)

Initialisation performed during activation of the module.

◆ reset_device()

def mw_source_smr.MicrowaveSMR.reset_device (   self)

Resets the device and sets the default values.

◆ reset_listpos()

def mw_source_smr.MicrowaveSMR.reset_listpos (   self)

Reset of MW List Mode position to start from first given frequency.

Returns
int: error code (0:OK, -1:error)

◆ reset_sweeppos()

def mw_source_smr.MicrowaveSMR.reset_sweeppos (   self)

Reset of MW sweep mode position to start (start frequency)

Returns
int: error code (0:OK, -1:error)

◆ set_cw()

def mw_source_smr.MicrowaveSMR.set_cw (   self,
  frequency = None,
  power = None 
)

Configures the device for cw-mode and optionally sets frequency and/or power.

Parameters
floatfrequency: frequency to set in Hz
floatpower: power to set in dBm
Returns
tuple(float, float, str): with the relation current frequency in Hz, current power in dBm, current mode

◆ set_ext_trigger()

def mw_source_smr.MicrowaveSMR.set_ext_trigger (   self,
  pol,
  timing 
)

Set the external trigger for this device with proper polarization.

Parameters
floattiming: estimated time between triggers
TriggerEdgepol: polarisation of the trigger (basically rising edge or falling edge)
Returns
object, float: current trigger polarity [TriggerEdge.RISING, TriggerEdge.FALLING], trigger timing

◆ set_list()

def mw_source_smr.MicrowaveSMR.set_list (   self,
  frequency = None,
  power = None 
)

Configures the device for list-mode and optionally sets frequencies and/or power.

Parameters
listfrequency: list of frequencies in Hz
floatpower: MW power of the frequency list in dBm
Returns
tuple(list, float, str): current frequencies in Hz, current power in dBm, current mode

◆ sweep_on()

def mw_source_smr.MicrowaveSMR.sweep_on (   self)

Switches on the sweep mode.

Returns
int: error code (0:OK, -1:error)

◆ trigger()

def mw_source_smr.MicrowaveSMR.trigger (   self)

Trigger the next element in the list or sweep mode programmatically.

Returns
int: error code (0:OK, -1:error)

Ensure that the Frequency was set AFTER the function returns, or give the function at least a save waiting time.

◆ turn_AM_off()

def mw_source_smr.MicrowaveSMR.turn_AM_off (   self)

Turn off the Amlitude Modulation Mode.

Returns
int: error code (0:OK, -1:error)

◆ turn_AM_on()

def mw_source_smr.MicrowaveSMR.turn_AM_on (   self,
  depth 
)

Turn on the Amplitude Modulation mode.

Parameters
floatdepth: modulation depth in percent (from 0 to 100%).
Returns
int: error code (0:OK, -1:error)

Set the Amplitude modulation based on an external DC signal source and switch on the device after configuration.


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