configure_afg
Set the built-in function generator's waveform, amplitude, offset, frequency, phase, duty, symmetry, and impedance without enabling or disabling its output.
Instructions
Configure the built-in function generator (AFG). Omitted items are left unchanged.
This never turns the generator output on or off. The output state is not touched at all, so nothing new reaches the wiring: a configured generator only emits a signal once its output is enabled with the separate, confirmation-gated tool enable_afg (and disable_afg turns it off again). Read the current output state with get_afg_state.
channel is the generator channel (1 or 2 on MHO98; see get_capabilities afg_channels). Specify at least one item to change.
waveform is sine / square / ramp / noise / dc / arb / exp_rise / exp_fall / ecg / gaussian / lorentz / haversine / sinc. amplitude_vpp is the peak-to-peak amplitude in volts (not the peak and not RMS), offset_v the DC offset in volts, frequency_hz the frequency in hertz, phase_deg the phase in degrees (0-360), duty_percent the duty cycle of the square wave (1-99) and symmetry_percent the symmetry of the ramp (0-100). Duty and symmetry are stored independently of the current waveform, so they can be set at any time.
impedance is "highz" or "50" and is the GENERATOR's own output impedance setting, i.e. the load the amplitude is calibrated for. It has nothing to do with the oscilloscope input impedance of configure_channel.
The frequency and amplitude limits depend on the installed options and on impedance, and the instrument clamps an out-of-range value silently (no error is reported): always compare applied (the read-back value) against requested. Writing a frequency while the waveform is dc or noise is rejected by the instrument.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | ||
| offset_v | No | ||
| waveform | No | ||
| impedance | No | ||
| phase_deg | No | ||
| duty_percent | No | ||
| frequency_hz | No | ||
| amplitude_vpp | No | ||
| symmetry_percent | No |