Skip to content

Function Generators

Auto-generated from driver source.


Keysight EDU33212A

Dual-channel function/arbitrary waveform generator.

Keysight_EDU33212A

Bases: DeviceManager

Driver for Keysight EDU33212A Dual-Channel Trueform Arbitrary Waveform Generator.

Channels are addressed via SOURce1/SOURce2 SCPI prefix. Output enable/disable uses OUTPut1/OUTPut2 (no SOURce prefix). Both channels default to OFF at power-on.

enable_output

enable_output(channel, enabled: bool = True)

Enable or disable the output for the specified channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
enabled bool

True to enable, False to disable.

True

disable_all_channels

disable_all_channels()

Zeroes SINE memory (0Hz freq, 0V amp/offset), switches to DC 0V, then disables output.

set_output_load

set_output_load(channel, load)

Set the output load impedance.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
load int | float | str

Load in Ohms (1-10000) or 'INF' for high-Z.

required

set_output_polarity

set_output_polarity(channel, normal: bool = True)

Set output polarity.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
normal bool

True for normal, False for inverted.

True

set_sync_output

set_sync_output(enabled: bool = True)

Enable or disable the Sync output signal.

get_amplitude

get_amplitude(channel)

Query the current amplitude (Vpp) for the specified channel.

get_offset

get_offset(channel)

Query the current DC offset for the specified channel.

get_frequency

get_frequency(channel)

Query the current frequency (Hz) for the specified channel.

get_output_state

get_output_state(channel)

Query whether the output is enabled for the specified channel.

set_function

set_function(channel, func)

Set the output waveform function.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
func str

One of SIN, SQU, RAMP, PULS, NOIS, PRBS, DC, ARB.

required

set_frequency

set_frequency(channel, frequency)

Set the output frequency.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
frequency float

Frequency in Hz (1 µHz to max for sine/square/ramp).

required

set_amplitude

set_amplitude(channel, amplitude)

Set the output amplitude in Vpp (default units).

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
amplitude float

Amplitude in Vpp.

required

set_offset

set_offset(channel, offset)

Set the DC offset voltage.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
offset float

Offset in Volts.

required

set_high_low

set_high_low(channel, high, low)

Set output using high and low voltage levels.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
high float

High voltage level in Volts.

required
low float

Low voltage level in Volts.

required

set_voltage_unit

set_voltage_unit(channel, unit)

Set the voltage unit for amplitude display.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
unit str

VPP, VRMS, or DBM.

required

set_square_duty

set_square_duty(channel, duty_cycle)

Set the duty cycle for a square wave.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
duty_cycle float

Duty cycle as a percentage (0.01 to 99.99).

required

set_ramp_symmetry

set_ramp_symmetry(channel, symmetry)

Set the symmetry of a ramp waveform.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
symmetry float

Symmetry percentage (0 to 100). 100% = sawtooth up, 0% = sawtooth down, 50% = triangle.

required

set_pulse_period

set_pulse_period(channel, period)

Set the pulse period.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
period float

Period in seconds.

required

set_pulse_width

set_pulse_width(channel, width)

Set the pulse width.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
width float

Pulse width in seconds (minimum 16 ns).

required

set_pulse_duty

set_pulse_duty(channel, duty_cycle)

Set the pulse duty cycle.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
duty_cycle float

Duty cycle as a percentage (0.01 to 99.99).

required

set_pulse_edge

set_pulse_edge(channel, leading=None, trailing=None)

Set the pulse edge transition times (10%-90%).

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
leading float | None

Leading edge time in seconds (8.4 ns to 1 µs).

None
trailing float | None

Trailing edge time in seconds (8.4 ns to 1 µs).

None

set_waveform

set_waveform(channel, wave_type, frequency=None, amplitude=None, offset=None, duty=None, symmetry=None)

Set waveform type and parameters for the specified channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
wave_type str

Waveform type (SIN, SQU, RAMP, PULS, NOIS, PRBS, DC, ARB).

required
frequency float | None

Frequency in Hz.

None
amplitude float | None

Amplitude in Vpp.

None
offset float | None

DC offset in Volts.

None
duty float | None

Duty cycle in % (SQU and PULS only).

None
symmetry float | None

Symmetry in % (RAMP only).

None

set_dc_output

set_dc_output(channel, voltage)

Configure channel for DC output at a specified voltage.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
voltage float

DC voltage in Volts.

required

set_am

set_am(channel, state: bool, depth=100.0, mod_freq=10.0, mod_func='SIN', source='INTernal', dssc=False)

Configure Amplitude Modulation (AM).

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable AM.

required
depth float

Modulation depth in % (0-120). Default 100%.

100.0
mod_freq float

Modulating frequency in Hz. Default 10 Hz.

10.0
mod_func str

Modulating waveform shape. Default SIN.

'SIN'
source str

INTernal, CH1, or CH2. Default INTernal.

'INTernal'
dssc bool

Enable double-sideband suppressed carrier. Default False.

False

set_fm

set_fm(channel, state: bool, deviation=100.0, mod_freq=10.0, mod_func='SIN', source='INTernal')

Configure Frequency Modulation (FM).

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable FM.

required
deviation float

Frequency deviation in Hz. Default 100 Hz.

100.0
mod_freq float

Modulating frequency in Hz. Default 10 Hz.

10.0
mod_func str

Modulating waveform shape. Default SIN.

'SIN'
source str

INTernal, CH1, or CH2. Default INTernal.

'INTernal'

set_pm

set_pm(channel, state: bool, deviation=180.0, mod_freq=10.0, mod_func='SIN', source='INTernal')

Configure Phase Modulation (PM).

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable PM.

required
deviation float

Phase deviation in degrees (0-360). Default 180°.

180.0
mod_freq float

Modulating frequency in Hz. Default 10 Hz.

10.0
mod_func str

Modulating waveform shape. Default SIN.

'SIN'
source str

INTernal, CH1, or CH2. Default INTernal.

'INTernal'

set_fsk

set_fsk(channel, state: bool, hop_freq=100.0, rate=10.0, source='INTernal')

Configure Frequency-Shift Keying (FSK) Modulation.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable FSK.

required
hop_freq float

Hop (alternate) frequency in Hz. Default 100 Hz.

100.0
rate float

FSK rate in Hz (internal only). Default 10 Hz.

10.0
source str

INTernal or EXTernal. Default INTernal.

'INTernal'

set_pwm

set_pwm(channel, state: bool, deviation=None, mod_freq=10.0, mod_func='SIN', source='INTernal')

Configure Pulse Width Modulation (PWM). Carrier must be PULS.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable PWM.

required
deviation float | None

Width deviation in seconds. Default None (instrument default).

None
mod_freq float

Modulating frequency in Hz. Default 10 Hz.

10.0
mod_func str

Modulating waveform shape. Default SIN.

'SIN'
source str

INTernal, CH1, or CH2. Default INTernal.

'INTernal'

set_sweep

set_sweep(channel, state: bool, start=100.0, stop=1000.0, time=1.0, spacing='LINear', hold_time=0.0, return_time=0.0)

Configure frequency sweep.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable sweep.

required
start float

Start frequency in Hz. Default 100 Hz.

100.0
stop float

Stop frequency in Hz. Default 1 kHz.

1000.0
time float

Sweep time in seconds. Default 1 s.

1.0
spacing str

LINear or LOGarithmic. Default LINear.

'LINear'
hold_time float

Hold time in seconds. Default 0.

0.0
return_time float

Return time in seconds. Default 0.

0.0

set_burst

set_burst(channel, state: bool, mode='TRIGgered', n_cycles=1, period=0.01, phase=0.0)

Configure burst mode.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
state bool

Enable or disable burst.

required
mode str

TRIGgered or GATed. Default TRIGgered.

'TRIGgered'
n_cycles int

Number of cycles per burst (1 to 100,000,000). Default 1.

1
period float

Burst period in seconds (triggered internal only). Default 10 ms.

0.01
phase float

Start phase in degrees (-360 to +360). Default 0.

0.0

set_trigger_source

set_trigger_source(channel, source='IMMediate')

Set the trigger source for sweep or burst.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
source str

IMMediate, EXTernal, TIMer, or BUS. Default IMMediate.

'IMMediate'

send_trigger

send_trigger()

Send a software (bus) trigger.

get_error

get_error()

Read the most recent error from the error queue.

save_state

save_state(location)

Save instrument state to non-volatile memory.

Parameters:

Name Type Description Default
location int

Memory location 0-4.

required

recall_state

recall_state(location)

Recall instrument state from non-volatile memory.

Parameters:

Name Type Description Default
location int

Memory location 0-4.

required

B&K Precision 4063

Dual-channel arbitrary waveform generator.

BK_4063

Bases: DeviceManager

Driver for B&K Precision 4063 Dual Channel Arbitrary Waveform Generator.

Based on 4060 Series Programming Manual.

disable_all_channels

disable_all_channels()

Zeroes SINE memory (0Hz freq, 0V amp/offset), switches to DC 0V, then disables output.

enable_output

enable_output(channel, enabled: bool = True)

Enable or disable the output of the specified channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
enabled bool

True to enable, False to disable.

True

set_output_impedance

set_output_impedance(channel, load)

Set the output load impedance.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
load str | int

Load impedance in Ohms (e.g. 50) or 'HZ' for High-Z.

required

set_sync_output

set_sync_output(channel, enabled: bool)

Enable or disable sync output for the specified channel.

get_amplitude

get_amplitude(channel)

Query the current amplitude (Vpp) for the specified channel.

get_offset

get_offset(channel)

Query the current DC offset for the specified channel.

get_frequency

get_frequency(channel)

Query the current frequency (Hz) for the specified channel.

get_output_state

get_output_state(channel)

Query whether output is enabled for the specified channel.

set_waveform

set_waveform(channel, wave_type, frequency=None, amplitude=None, offset=None, phase=None, duty=None, symmetry=None)

Set waveform parameters for the specified channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2).

required
wave_type str

Waveform type (SINE, SQUARE, RAMP, PULSE, NOISE, DC, ARB).

required
frequency float

Frequency in Hz (not for NOISE/DC).

None
amplitude float

Amplitude in Vpp (not for NOISE/DC).

None
offset float

Offset in V (not for NOISE).

None
phase float

Phase in degrees (0-360).

None
duty float

Duty cycle in % (SQUARE/PULSE only).

None
symmetry float

Symmetry in % (RAMP only).

None

set_dc_output

set_dc_output(channel, voltage)

Configure channel for DC output.

set_modulation

set_modulation(channel, state: bool, mod_type='AM', source='INT', **kwargs)

Configure modulation for the specified channel.

Parameters:

Name Type Description Default
channel int

Channel number.

required
state bool

Enable or disable modulation.

required
mod_type str

AM, FM, PM, FSK, ASK, DSBAM, PWM.

'AM'
source str

INT or EXT.

'INT'
**kwargs

Type-specific parameters (e.g., FRQ, DEPTH, DEVI).

{}

set_sweep

set_sweep(channel, state: bool, **kwargs)

Configure frequency sweep.

Parameters:

Name Type Description Default
channel int

Channel number.

required
state bool

Enable or disable sweep.

required
**kwargs

Sweep parameters (TIME, START, STOP, SOUCE, etc.).

{}

set_burst

set_burst(channel, state: bool, **kwargs)

Configure burst mode.

Parameters:

Name Type Description Default
channel int

Channel number.

required
state bool

Enable or disable burst.

required
**kwargs

Burst parameters (MODE, PRD, STPS, etc.).

{}

copy_channel

copy_channel(dest_channel, src_channel)

Copy parameters from source channel to destination channel.

get_error

get_error()

Reads the most recent error from the system error queue.


JDS6600

DDS signal generator (serial/USB).

JDS6600_Generator

Bases: DeviceManager

Driver for JDS6600/Seesii DDS Signal Generator (Dual-channel, up to 60MHz).

Uses ASCII protocol over USB serial at 115200 baud. Command format: :wNN=DATA.

connect

connect()

Override to set serial communication parameters.

enable_output

enable_output(ch1: bool = None, ch2: bool = None)

Enable or disable channel outputs.

Parameters:

Name Type Description Default
ch1 bool

Enable channel 1 if True, disable if False, keep current if None

None
ch2 bool

Enable channel 2 if True, disable if False, keep current if None

None

set_waveform

set_waveform(channel: int, waveform: str)

Set waveform type for a channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2)

required
waveform str

Waveform type (sine, square, triangle, pulse, dc, noise, etc.)

required

set_frequency

set_frequency(channel: int, freq_hz: float)

Set frequency for a channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2)

required
freq_hz float

Frequency in Hz (0.01 Hz to 60 MHz depending on model)

required

set_amplitude

set_amplitude(channel: int, amplitude_v: float)

Set amplitude (Vpp) for a channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2)

required
amplitude_v float

Amplitude in volts peak-to-peak (0.001V to ~20V depending on model)

required

set_duty_cycle

set_duty_cycle(channel: int, duty_percent: float)

Set duty cycle for pulse/square waveforms.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2)

required
duty_percent float

Duty cycle percentage (0.1% to 99.9%)

required

set_offset

set_offset(channel: int, offset_v: float)

Set DC offset for a channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2)

required
offset_v float

DC offset in volts (-10V to +10V typical range)

required

set_phase

set_phase(channel: int, phase_deg: float)

Set phase for a channel.

Parameters:

Name Type Description Default
channel int

Channel number (1 or 2)

required
phase_deg float

Phase in degrees (0 to 359.9)

required

set_sync

set_sync(freq: bool = False, waveform: bool = False, amplitude: bool = False, offset: bool = False, duty: bool = False)

Set channel synchronization (CH2 follows CH1).

Parameters:

Name Type Description Default
freq bool

Synchronize frequency

False
waveform bool

Synchronize waveform type

False
amplitude bool

Synchronize amplitude

False
offset bool

Synchronize DC offset

False
duty bool

Synchronize duty cycle

False

get_amplitude

get_amplitude(channel)

Return cached amplitude (Vpp) for a channel, or None if never set.

get_offset

get_offset(channel)

Return cached DC offset for a channel, or None if never set.

get_frequency

get_frequency(channel)

Return cached frequency (Hz) for a channel, or None if never set.

get_output_state

get_output_state(channel)

Return cached output state for a channel.

disable_output

disable_output()

Zeroes SINE memory (0Hz freq, 0V amp/offset), switches to DC 0V, then disables outputs.