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 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 ¶
Zeroes SINE memory (0Hz freq, 0V amp/offset), switches to DC 0V, then disables output.
set_output_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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel
|
int
|
Channel number (1 or 2). |
required |
normal
|
bool
|
True for normal, False for inverted. |
True
|
get_output_state ¶
Query whether the output is enabled for the specified channel.
set_function ¶
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 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 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 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 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 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 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 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 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 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 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 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 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'
|
save_state ¶
Save instrument state to non-volatile memory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
int
|
Memory location 0-4. |
required |
recall_state ¶
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 ¶
Zeroes SINE memory (0Hz freq, 0V amp/offset), switches to DC 0V, then disables output.
enable_output ¶
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 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 ¶
Enable or disable sync output for the specified channel.
get_output_state ¶
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_modulation ¶
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 ¶
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 ¶
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 parameters from source channel to destination channel.
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.
enable_output ¶
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 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 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 (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 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 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 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 ¶
Return cached amplitude (Vpp) for a channel, or None if never set.
get_frequency ¶
Return cached frequency (Hz) for a channel, or None if never set.
disable_output ¶
Zeroes SINE memory (0Hz freq, 0V amp/offset), switches to DC 0V, then disables outputs.