Function Generators

This module provides support for controlling function generators with Python. Arbitrary waveform generators and function generators can be imported by

>>> import hardware
>>> awg = hardware.function_generators.Agilent_33250A('GPIB0:...')
class hardware.function_generators.Agilent_33250A(visa_search_term)[source]

Hardware wrapper for the Agilent 33250A Arbitrary Waveform Generator

Parameters:

visa_search_term (str) – The address that is passed to visa.ResourceManager().open_resource()

Variables:
  • frequency (float) – The frequency in Hz. Also aliases to freq
  • voltage (float) – The peak-to-peak voltage in volts. Also aliases to volt`
  • waveform (str) – A string in the array ['SIN', 'SQU', 'RAMP', 'PULS', 'NOIS', 'DC', 'USER' ]
  • phase (float) – The relative phase to other instruments synced through the 10 MHz reference clock.
  • duty_cycle (float) – The duty cycle of the square wave form in percent.
identify()[source]
Returns:str – the response from the *IDN? GPIB query.
save_as(waveform_name)[source]

Saves the data in volatile memory as waveform_name

Parameters:waveform_name (str) – The name of the saved waveform
upload(points_array)[source]

Uploads an array of points to the function generator volatile memory.

Parameters:points_array (array-like) – The waveform shape
upload_as(points_array, waveform_name)[source]

Uploads an array of points to the function generator, and saves them by name waveform_name

Parameters:
  • points_array (array-like) – The waveform shape
  • waveform_name (str) – The variable name to store in the waveform generator.
class hardware.function_generators.HP_33120A(visa_search_term)[source]

Hardware wrapper for the HP 33120A Arbitrary Waveform Generator

Parameters:

visa_search_term (str) – The address that is passed to visa.ResourceManager().open_resource()

Variables:
  • frequency (float) – The frequency in Hz. Also aliases to freq
  • voltage (float) – The peak-to-peak voltage in volts. Also aliases to volt`
  • waveform (str) – A string in the array ['SIN', 'SQU', 'RAMP', 'PULS', 'NOIS', 'DC', 'USER' ]
  • phase (float) – The relative phase to other instruments synced through the 10 MHz reference clock.
  • duty_cycle (float) – The duty cycle of the square wave form in percent.
identify()[source]
Returns:str – the response from the *IDN? GPIB query.
save_as(waveform_name)[source]

Saves the data in volatile memory as waveform_name

Parameters:waveform_name (str) – The name of the saved waveform
upload(points_array)[source]

Uploads an array of points to the function generator volatile memory.

Parameters:points_array (array-like) – The waveform shape
upload_as(points_array, waveform_name)[source]

Uploads an array of points to the function generator, and saves them by name waveform_name

Parameters:
  • points_array (array-like) – The waveform shape
  • waveform_name (str) – The variable name to store in the waveform generator.
class hardware.function_generators.SRS_DS345(visa_search_term)[source]

Hardware wrapper for the Stanford Research Systems DS345 Arbitrary Waveform Generator

Parameters:

visa_search_term (str) – The address that is passed to visa.ResourceManager().open_resource()

Variables:
  • frequency (float) – The frequency in Hz. Also aliases to freq
  • voltage (float) – The peak-to-peak voltage in volts. Also aliases to
  • waveform (volt) – A string in the array ['SIN', 'SQU', 'RAMP', 'PULS', 'NOIS', 'DC', 'USER' ]
  • phase (float) – The relative phase to other instruments synced through
  • 10 MHz reference clock. (the) –
  • duty_cycle (float) – The duty cycle of the square wave form in percent.
identify()[source]
Returns:str – the response from the *IDN? GPIB query.