dso_awg module

class dso_awg.Awg(parent)

Bases: object

This module can control the AWG function on your DSO

amp(ch: int = 1) float

Now amplitude

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

amplitude value

Return type:

float

freq(ch: int = 1) float

Now frequency

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

frequency value

Return type:

float

is_on(ch: int = 1) bool
Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

True or False

Return type:

bool

load(ch: int = 1) str

Now load

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

FIFTY or HIGHZ

Return type:

str

load_arb_waveform(ch: int = 1, source: str | None = None) None

Load the arbitrary waveform.

Parameters:
  • ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

  • source (str) – The waveform file to be loaded. Must be one of the predefined waveforms {‘ARB1’, ‘ARB2’, ‘ARB3’, ‘ARB4’} or a file path such as ‘Disk:/xxx.UAW’ or ‘USB:/xxx.UAW’.

offset(ch: int = 1) float

Now offset

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

offset value

Return type:

float

phase(ch: int = 1) float

Returns the channel phase.

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

channel phase

Return type:

float

set_awg_parameters(ch: int = 1, wave: str | None = None, freq: float | None = None, amp: float | None = None, offset: float | None = None, enable: bool | None = None) None

Sets various parameters for AWG.

Parameters:
  • ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

  • wave (str, optional) – ARBitrary | SINE | SQUAre | PULSe | RAMP | DC | NOISe | SINC | GAUSsian | LORENtz | EXPRise | EXPFall | HAVERSINe | CARDIac.

  • freq (float, optional) – waveform frequency.

  • amp (float, optional) – waveform amplitude.

  • offset (float, optional) – waveform offset.

  • enable (bool, optional) – If True, sets AWG output ON. If False, sets AWG output OFF.

set_load_50ohm(ch: int = 1)

Set load to 50 ohm

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

set_load_highz(ch: int = 1)

Set load to HighZ

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

set_off(ch: int = 1)

Set AWG OFF

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

set_on(ch: int = 1, wave: str | None = None, freq: float | None = None, amp: float | None = None, offset: float | None = None)

Set AWG ON

Parameters:
  • ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

  • wave (str, optional) – ARBitrary | SINE | SQUAre | PULSe | RAMP | DC | NOISe | SINC | GAUSsian | LORENtz | EXPRise | EXPFall | HAVERSINe | CARDIac. Defaults to None is do not change.

  • freq (float, optional) – waveform frequency. Defaults to None is do not change.

  • amp (float, optional) – waveform amplitude. Defaults to None is do not change.

  • offset (float, optional) – waveform offset. Defaults to None is do not change.

set_phase(ch: int = 1, value: float | None = None)

Sets the channel phase

Parameters:
  • ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

  • value (float) – channel phase

wave(ch: int = 1) str

Now waveform.

Parameters:

ch (int, optional) – AWG Channel number (1 or 2). Defaults to 1.

Returns:

waveform

Return type:

str