Qudi
Public Member Functions | Public Attributes | List of all members
tektronix_awg70k.AWG70K Class Reference

A hardware module for the Tektronix AWG70000 series for generating waveforms and sequences thereof. More...

Inheritance diagram for tektronix_awg70k.AWG70K:
Inheritance graph
[legend]
Collaboration diagram for tektronix_awg70k.AWG70K:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, args, kwargs)
 
def on_activate (self)
 Initialisation performed during activation of the module.
 
def on_deactivate (self)
 Required tasks to be performed during deactivation of the module.
 
def get_constraints (self)
 Retrieve the hardware constrains from the Pulsing device. More...
 
def pulser_on (self)
 Switches the pulsing device on. More...
 
def pulser_off (self)
 Switches the pulsing device off. More...
 
def write_waveform (self, name, analog_samples, digital_samples, is_first_chunk, is_last_chunk, total_number_of_samples)
 
def write_sequence (self, name, sequence_parameter_list)
 Write a new sequence on the device memory. More...
 
def get_waveform_names (self)
 Retrieve the names of all uploaded waveforms on the device. More...
 
def get_sequence_names (self)
 Retrieve the names of all uploaded sequence on the device. More...
 
def delete_waveform (self, waveform_name)
 Delete the waveform with name "waveform_name" from the device memory. More...
 
def delete_sequence (self, sequence_name)
 Delete the sequence with name "sequence_name" from the device memory. More...
 
def load_waveform (self, load_dict)
 Loads a waveform to the specified channel of the pulsing device. More...
 
def load_sequence (self, sequence_name)
 Loads a sequence to the channels of the device in order to be ready for playback. More...
 
def get_loaded_assets (self)
 
def clear_all (self)
 Clears all loaded waveform from the pulse generators RAM. More...
 
def get_status (self)
 Retrieves the status of the pulsing hardware. More...
 
def set_sample_rate (self, sample_rate)
 Set the sample rate of the pulse generator hardware. More...
 
def get_sample_rate (self)
 Set the sample rate of the pulse generator hardware. More...
 
def get_analog_level (self, amplitude=None, offset=None)
 Retrieve the analog amplitude and offset of the provided channels. More...
 
def set_analog_level (self, amplitude=None, offset=None)
 Set amplitude and/or offset value of the provided analog channel. More...
 
def get_digital_level (self, low=None, high=None)
 Retrieve the digital low and high level of the provided channels. More...
 
def set_digital_level (self, low=None, high=None)
 Set low and/or high value of the provided digital channel. More...
 
def get_active_channels (self, ch=None)
 Get the active channels of the pulse generator hardware. More...
 
def set_active_channels (self, ch=None)
 
def get_interleave (self)
 Check whether Interleave is ON or OFF in AWG. More...
 
def set_interleave (self, state=False)
 Turns the interleave of an AWG on or off. More...
 
def has_sequence_mode (self)
 Asks the pulse generator whether sequence mode exists. More...
 
def reset (self)
 Reset the device. More...
 
def query (self, question)
 Asks the device a 'question' and receive and return an answer from it. More...
 
def write (self, command)
 Sends a command string to the device. More...
 
def new_sequence (self, name, steps)
 
def sequence_set_waveform (self, sequence_name, waveform_name, step, track)
 Set the waveform 'waveform_name' to position 'step' in the sequence 'sequence_name'. More...
 
def sequence_set_repetitions (self, sequence_name, step, repeat=0)
 
def sequence_set_goto (self, sequence_name, step, goto=-1)
 
def sequence_set_event_jump (self, sequence_name, step, trigger='OFF', jumpto=0)
 Set the event trigger input of the specified sequence step and the jump_to destination. More...
 
def sequence_set_wait_trigger (self, sequence_name, step, trigger='OFF')
 Make a certain sequence step wait for a trigger to start playing. More...
 
def sequence_set_flags (self, sequence_name, step, flags=None, trigger=False)
 
def make_sequence_continuous (self, sequencename)
 
def force_jump_sequence (self, final_step, channel=1)
 
- 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

 awg
 
 awg_model
 
 ftp_working_dir
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Detailed Description

A hardware module for the Tektronix AWG70000 series for generating waveforms and sequences thereof.

Example config for copy-paste:

pulser_awg70000: module 'awg.tektronix_awg70k.AWG70k' awg_visa_address 'TCPIP::10.42.0.211::INSTR' awg_ip_address '10.42.0.211' timeout 60

tmp_work_dir: 'C:\Software\qudi_pulsed_files' # optional

ftp_root_dir: 'C:\inetpub\ftproot' # optional, root directory on AWG device

ftp_login: 'anonymous' # optional, the username for ftp login

ftp_passwd: 'anonymous@' # optional, the password for ftp login

Member Function Documentation

◆ clear_all()

def tektronix_awg70k.AWG70K.clear_all (   self)

Clears all loaded waveform from the pulse generators RAM.

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

Unused for digital pulse generators without storage capability (PulseBlaster, FPGA).

◆ delete_sequence()

def tektronix_awg70k.AWG70K.delete_sequence (   self,
  sequence_name 
)

Delete the sequence with name "sequence_name" from the device memory.

Parameters
strsequence_name: The name of the sequence to be deleted Optionally a list of sequence names can be passed.
Returns
list: a list of deleted sequence names.

◆ delete_waveform()

def tektronix_awg70k.AWG70K.delete_waveform (   self,
  waveform_name 
)

Delete the waveform with name "waveform_name" from the device memory.

Parameters
strwaveform_name: The name of the waveform to be deleted Optionally a list of waveform names can be passed.
Returns
list: a list of deleted waveform names.

◆ get_active_channels()

def tektronix_awg70k.AWG70K.get_active_channels (   self,
  ch = None 
)

Get the active channels of the pulse generator hardware.

Parameters
listch: optional, if specific analog or digital channels are needed to be asked without obtaining all the channels.
Returns
dict: where keys denoting the channel number and items boolean expressions whether channel are active or not.

Example for an possible input (order is not important): ch = ['a_ch2', 'd_ch2', 'a_ch1', 'd_ch5', 'd_ch1'] then the output might look like {'a_ch2': True, 'd_ch2': False, 'a_ch1': False, 'd_ch5': True, 'd_ch1': False}

If no parameters are passed to this method all channels will be asked for their setting.

◆ get_analog_level()

def tektronix_awg70k.AWG70K.get_analog_level (   self,
  amplitude = None,
  offset = None 
)

Retrieve the analog amplitude and offset of the provided channels.

Parameters
listamplitude: optional, if a specific amplitude value (in Volt peak to peak, i.e. the full amplitude) of a channel is desired.
listoffset: optional, if a specific high value (in Volt) of a channel is desired.
Returns
dict: with keys being the generic string channel names and items being the values for those channels. Amplitude is always denoted in Volt-peak-to-peak and Offset in (absolute) Voltage.
Note
Do not return a saved amplitude and/or offset value but instead retrieve the current amplitude and/or offset directly from the device.

If no entries provided then the levels of all channels where simply returned. If no analog channels provided, return just an empty dict. Example of a possible input: amplitude = ['a_ch1','a_ch4'], offset =[1,3] to obtain the amplitude of channel 1 and 4 and the offset {'a_ch1': -0.5, 'a_ch4': 2.0} {'a_ch1': 0.0, 'a_ch3':-0.75} since no high request was performed.

The major difference to digital signals is that analog signals are always oscillating or changing signals, otherwise you can use just digital output. In contrast to digital output levels, analog output levels are defined by an amplitude (here total signal span, denoted in Voltage peak to peak) and an offset (a value around which the signal oscillates, denoted by an (absolute) voltage).

In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!

◆ get_constraints()

def tektronix_awg70k.AWG70K.get_constraints (   self)

Retrieve the hardware constrains from the Pulsing device.

Returns
constraints object: object with pulser constraints as attributes.

Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller.

SEE PulserConstraints CLASS IN pulser_interface.py FOR AVAILABLE CONSTRAINTS!!!

If you are not sure about the meaning, look in other hardware files to get an impression. If still additional constraints are needed, then they have to be added to the PulserConstraints class.

Each scalar parameter is an ScalarConstraints object defined in cor.util.interfaces. Essentially it contains min/max values as well as min step size, default value and unit of the parameter.

PulserConstraints.activation_config differs, since it contain the channel configuration/activation information of the form: {<descriptor_str>: <channel_set>, <descriptor_str>: <channel_set>, ...}

If the constraints cannot be set in the pulsing hardware (e.g. because it might have no sequence mode) just leave it out so that the default is used (only zeros).

◆ get_digital_level()

def tektronix_awg70k.AWG70K.get_digital_level (   self,
  low = None,
  high = None 
)

Retrieve the digital low and high level of the provided channels.

Parameters
listlow: optional, if a specific low value (in Volt) of a channel is desired.
listhigh: optional, if a specific high value (in Volt) of a channel is desired.
Returns
: (dict, dict): tuple of two dicts, with keys being the channel number and items being the values for those channels. Both low and high value of a channel is denoted in (absolute) Voltage.
Note
Do not return a saved low and/or high value but instead retrieve the current low and/or high value directly from the device.

If no entries provided then the levels of all channels where simply returned. If no digital channels provided, return just an empty dict.

Example of a possible input: low = ['d_ch1', 'd_ch4'] to obtain the low voltage values of digital channel 1 an 4. A possible answer might be {'d_ch1': -0.5, 'd_ch4': 2.0} {} since no high request was performed.

The major difference to analog signals is that digital signals are either ON or OFF, whereas analog channels have a varying amplitude range. In contrast to analog output levels, digital output levels are defined by a voltage, which corresponds to the ON status and a voltage which corresponds to the OFF status (both denoted in (absolute) voltage)

In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!

◆ get_interleave()

def tektronix_awg70k.AWG70K.get_interleave (   self)

Check whether Interleave is ON or OFF in AWG.

Returns
bool: True: ON, False: OFF

Unused for pulse generator hardware other than an AWG.

◆ get_sample_rate()

def tektronix_awg70k.AWG70K.get_sample_rate (   self)

Set the sample rate of the pulse generator hardware.

Returns
float: The current sample rate of the device (in Hz)

◆ get_sequence_names()

def tektronix_awg70k.AWG70K.get_sequence_names (   self)

Retrieve the names of all uploaded sequence on the device.

Returns
list: List of all uploaded sequence name strings in the device workspace.

◆ get_status()

def tektronix_awg70k.AWG70K.get_status (   self)

Retrieves the status of the pulsing hardware.

Returns
(int, dict): inter value of the current status with the corresponding dictionary containing status description for all the possible status variables of the pulse generator hardware

◆ get_waveform_names()

def tektronix_awg70k.AWG70K.get_waveform_names (   self)

Retrieve the names of all uploaded waveforms on the device.

Returns
list: List of all uploaded waveform name strings in the device workspace.

◆ has_sequence_mode()

def tektronix_awg70k.AWG70K.has_sequence_mode (   self)

Asks the pulse generator whether sequence mode exists.

Returns
: bool, True for yes, False for no.

◆ load_sequence()

def tektronix_awg70k.AWG70K.load_sequence (   self,
  sequence_name 
)

Loads a sequence to the channels of the device in order to be ready for playback.

For devices that have a workspace (i.e. AWG) this will load the sequence from the device workspace into the channels.

Parameters
sequence_namestr, name of the sequence to load
Returns
(dict, str): Dictionary with keys being the channel number and values being the respective asset loaded into the channel, string describing the asset type ('waveform' or 'sequence')

◆ load_waveform()

def tektronix_awg70k.AWG70K.load_waveform (   self,
  load_dict 
)

Loads a waveform to the specified channel of the pulsing device.

For devices that have a workspace (i.e. AWG) this will load the waveform from the device workspace into the channel. For a device without mass memory this will make the waveform/pattern that has been previously written with self.write_waveform ready to play.

Parameters
load_dictdict|list, a dictionary with keys being one of the available channel index and values being the name of the already written waveform to load into the channel. Examples {1: rabi_ch1, 2: rabi_ch2} or {1: rabi_ch2, 2: rabi_ch1} If just a list of waveform names if given, the channel association will be invoked from the channel suffix '_ch1', '_ch2' etc.
Returns
(dict, str): Dictionary with keys being the channel number and values being the respective asset loaded into the channel, string describing the asset type ('waveform' or 'sequence')

◆ pulser_off()

def tektronix_awg70k.AWG70K.pulser_off (   self)

Switches the pulsing device off.

Returns
int: error code (0:OK, -1:error, higher number corresponds to current status of the device. Check then the class variable status_dic.)

◆ pulser_on()

def tektronix_awg70k.AWG70K.pulser_on (   self)

Switches the pulsing device on.

Returns
int: error code (0:OK, -1:error, higher number corresponds to current status of the device. Check then the class variable status_dic.)

◆ query()

def tektronix_awg70k.AWG70K.query (   self,
  question 
)

Asks the device a 'question' and receive and return an answer from it.

Parameters
stringquestion: string containing the command
Returns
string: the answer of the device to the 'question' in a string

◆ reset()

def tektronix_awg70k.AWG70K.reset (   self)

Reset the device.

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

◆ sequence_set_event_jump()

def tektronix_awg70k.AWG70K.sequence_set_event_jump (   self,
  sequence_name,
  step,
  trigger = 'OFF',
  jumpto = 0 
)

Set the event trigger input of the specified sequence step and the jump_to destination.

Parameters
strsequence_name: Name of the sequence to be edited
intstep: Sequence step to be edited
strtrigger: Trigger string specifier. ('OFF', 'A', 'B' or 'INT')
intjumpto: The sequence step to jump to. 0 or -1 is interpreted as next step
Returns
int: error code

◆ sequence_set_goto()

def tektronix_awg70k.AWG70K.sequence_set_goto (   self,
  sequence_name,
  step,
  goto = -1 
)
Parameters
strsequence_name:
intstep:
intgoto:
Returns
int: error code

◆ sequence_set_wait_trigger()

def tektronix_awg70k.AWG70K.sequence_set_wait_trigger (   self,
  sequence_name,
  step,
  trigger = 'OFF' 
)

Make a certain sequence step wait for a trigger to start playing.

Parameters
strsequence_name: Name of the sequence to be edited
intstep: Sequence step to be edited
strtrigger: Trigger string specifier. ('OFF', 'A', 'B' or 'INT')
Returns
int: error code

◆ sequence_set_waveform()

def tektronix_awg70k.AWG70K.sequence_set_waveform (   self,
  sequence_name,
  waveform_name,
  step,
  track 
)

Set the waveform 'waveform_name' to position 'step' in the sequence 'sequence_name'.

Parameters
strsequence_name: Name of the sequence which should be editted
strwaveform_name: Name of the waveform which should be added
intstep: Position of the added waveform
inttrack: track which should be editted
Returns
int: error code

◆ set_analog_level()

def tektronix_awg70k.AWG70K.set_analog_level (   self,
  amplitude = None,
  offset = None 
)

Set amplitude and/or offset value of the provided analog channel.

Parameters
dictamplitude: dictionary, with key being the channel and items being the amplitude values (in Volt peak to peak, i.e. the full amplitude) for the desired channel.
dictoffset: dictionary, with key being the channel and items being the offset values (in absolute volt) for the desired channel.
Returns
(dict, dict): tuple of two dicts with the actual set values for amplitude and offset.

If nothing is passed then the command will return two empty dicts.

Note
After setting the analog and/or offset of the device, retrieve them again for obtaining the actual set value(s) and use that information for further processing.

The major difference to digital signals is that analog signals are always oscillating or changing signals, otherwise you can use just digital output. In contrast to digital output levels, analog output levels are defined by an amplitude (here total signal span, denoted in Voltage peak to peak) and an offset (a value around which the signal oscillates, denoted by an (absolute) voltage).

In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!

◆ set_digital_level()

def tektronix_awg70k.AWG70K.set_digital_level (   self,
  low = None,
  high = None 
)

Set low and/or high value of the provided digital channel.

Parameters
dictlow: dictionary, with key being the channel and items being the low values (in volt) for the desired channel.
dicthigh: dictionary, with key being the channel and items being the high values (in volt) for the desired channel.
Returns
(dict, dict): tuple of two dicts where first dict denotes the current low value and the second dict the high value.

If nothing is passed then the command will return two empty dicts.

Note
After setting the high and/or low values of the device, retrieve them again for obtaining the actual set value(s) and use that information for further processing.

The major difference to analog signals is that digital signals are either ON or OFF, whereas analog channels have a varying amplitude range. In contrast to analog output levels, digital output levels are defined by a voltage, which corresponds to the ON status and a voltage which corresponds to the OFF status (both denoted in (absolute) voltage)

In general there is no bijective correspondence between (amplitude, offset) and (value high, value low)!

◆ set_interleave()

def tektronix_awg70k.AWG70K.set_interleave (   self,
  state = False 
)

Turns the interleave of an AWG on or off.

Parameters
boolstate: The state the interleave should be set to (True: ON, False: OFF)
Returns
bool: actual interleave status (True: ON, False: OFF)
Note
After setting the interleave of the device, retrieve the interleave again and use that information for further processing.

Unused for pulse generator hardware other than an AWG.

◆ set_sample_rate()

def tektronix_awg70k.AWG70K.set_sample_rate (   self,
  sample_rate 
)

Set the sample rate of the pulse generator hardware.

Parameters
floatsample_rate: The sample rate to be set (in Hz)
Returns
foat: the sample rate returned from the device (-1:error)

◆ write()

def tektronix_awg70k.AWG70K.write (   self,
  command 
)

Sends a command string to the device.

Parameters
stringcommand: string containing the command
Returns
int: error code (0:OK, -1:error)

◆ write_sequence()

def tektronix_awg70k.AWG70K.write_sequence (   self,
  name,
  sequence_parameter_list 
)

Write a new sequence on the device memory.

Parameters
namestr, the name of the waveform to be created/append to
sequence_parameter_listlist, contains the parameters for each sequence step and the according waveform names.
Returns
: int, number of sequence steps written (-1 indicates failed process)

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