The Keysight M9383B and M9384B vector signal generator is controlled remotely with SCPI commands. TestFlow's instrument library holds 95 commands for it, 32 of them queries that read values or state, grouped below by subsystem with their arguments. It is the same library TestFlow's AI agent uses to drive the M9383B on a real bench.
Describe the test; TestFlow's agent uses this command set to drive your Keysight M9383B or M9384B and writes the report from the measured results.
With PyVISA, any VISA backend, and the instrument on USB, LAN or GPIB, this opens a session, identifies the instrument, sends one setting, and reads one value. Every command in it comes from the reference below. For a full walkthrough, see the PyVISA tutorial and the SCPI command cheat sheet.
import pyvisa
rm = pyvisa.ResourceManager()
print(rm.list_resources()) # find the Keysight M9383B's VISA address
# Paste the address of your Keysight M9383B (USB, LAN or GPIB).
inst = rm.open_resource("PASTE_VISA_ADDRESS_HERE")
inst.timeout = 5000 # ms
print(inst.query("*IDN?")) # identify the instrument
inst.write(":OUTPut:STATe ON") # Turn On RF Output
print(inst.query(":OUTPut:STATe?")) # Read RF Output State
inst.close()Describe the test; TestFlow's agent uses this command set to drive your Keysight M9383B or M9384B and writes the report from the measured results.
Describe the test in a sentence, for example “turn on rf output on the M9383B, then read rf output state and log it against a limit”. TestFlow's agent builds the steps from this command library, runs them on your bench through the TestFlow desktop app, and writes the report from the measured values. See AI test automation for lab instruments for how that works and where it stops.
95 commands in 9 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The M9383B and M9384B share this command set in TestFlow's library.
| Command | What it does | Arguments |
|---|---|---|
| :SOURce:FREQuency:CW <Freq> | Set Frequency. Sets the CW/fixed RF output frequency in Hz (9 kHz to 44 GHz). | Number |
| :SOURce:FREQuency:CW? | Read Frequency. Reads the current CW/fixed RF output frequency in Hz. | None |
| :SOURce:FREQuency:OFFSet <Freq> | Set Frequency Offset. Sets a frequency offset added to the displayed RF frequency to account for external hardware. | Number |
| :SOURce:FREQuency:OFFSet? | Read Frequency Offset. Reads the current frequency offset value in Hz. | None |
| :SOURce:FREQuency:MULTiplier <Mult> | Set Frequency Multiplier. Sets a multiplication factor applied to the displayed RF frequency for external multipliers. | Number |
| :SOURce:FREQuency:MULTiplier? | Read Frequency Multiplier. Reads the frequency multiplier factor. | None |
| :SOURce:POWer:LEVel:IMMediate:AMPLitude <Power> | Set Power Level. Sets the RF output power level in dBm. | Number |
| :SOURce:POWer:LEVel:IMMediate:AMPLitude? | Read Power Level. Reads the current RF output power level in dBm. | None |
| :SOURce:POWer:LEVel:IMMediate:OFFSet <Offset> | Set Power Offset. Sets a power offset in dB added to the displayed RF level to account for external gain or loss. | Number |
| :SOURce:POWer:LEVel:IMMediate:OFFSet? | Read Power Offset. Reads the current RF power offset in dB. | None |
| :SOURce:POWer:ALC:STATe ON | Turn On ALC. Enables the automatic level control (ALC) loop. | None |
| :SOURce:POWer:ALC:STATe OFF | Turn Off ALC. Disables the automatic level control loop; the instrument runs open-loop. | None |
| :SOURce:POWer:ALC:STATe? | Read ALC State. Reads whether the ALC loop is enabled. | None |
| :SOURce:POWer:ALC:SOURce <Source> | Set ALC Source. Selects the leveling source used by the ALC loop. | Text: INTernal |
| :SOURce:POWer:ALC:SOURce? | Read ALC Source. Reads the currently selected ALC leveling source. | None |
| :SOURce:POWer:ALC:LEVel <Level> | Set ALC Level. Sets the ALC level in dB used when leveling with an external detector. | Number |
| :SOURce:POWer:ALC:BANDwidth <Freq> | Set ALC Bandwidth. Sets the ALC loop bandwidth in Hz when automatic bandwidth selection is off. | Text: VSLow,SLOW,MEDium,FAST |
| :SOURce:POWer:ATTenuation <Atten> | Set Attenuation. Sets the RF output attenuator value in dB when the attenuator is in manual mode. | Number |
| :SOURce:POWer:ATTenuation? | Read Attenuation. Reads the current RF output attenuation in dB. | None |
| :SOURce:POWer:ATTenuation:AUTO ON | Turn On Attenuator Auto. Couples the attenuator to the power level setting (automatic attenuator mode). | None |
| :SOURce:POWer:ATTenuation:AUTO OFF | Turn Off Attenuator Auto. Decouples the attenuator so it can be set manually. | None |
| :SOURce:POWer:REFerence <Power> | Set Power Reference. Sets the RF power reference level in dBm used for relative power display. | Number |
| :SOURce:POWer:REFerence:STATe ON | Turn On Power Reference. Enables relative power mode using the stored power reference. | None |
| :SOURce:POWer:REFerence:STATe OFF | Turn Off Power Reference. Disables relative power mode. | None |
| :SOURce:PHASe:OFFSet <Phase> | Set Phase. Adjusts the phase of the RF output signal relative to the current phase reference in radians or degrees. | Number |
| :SOURce:PHASe:OFFSet? | Read Phase. Reads the current RF phase adjustment. | None |
| :SOURce:ROSCillator:SOURce <Source> | Set Reference Oscillator Source. Selects the reference oscillator source used by the instrument. | Text: INTernal,EXTernal,PPS |
| :SOURce:ROSCillator:SOURce? | Read Reference Oscillator Source. Reads the currently selected reference oscillator source. | None |
| :SOURce:ROSCillator:FREQuency:EXTernal <Freq> | Set External Reference Frequency. Sets the expected frequency of the external reference input signal in Hz. | Number |
| :SOURce:ROSCillator:FREQuency:EXTernal? | Read External Reference Frequency. Reads the configured external reference input frequency in Hz. | None |
| :SOURce:DM:STATe ON | Turn On IQ Modulation. Enables the I/Q modulator. | None |
| :SOURce:DM:STATe OFF | Turn Off IQ Modulation. Disables the I/Q modulator. | None |
| :SOURce:DM:STATe? | Read IQ Modulation State. Reads whether the I/Q modulator is enabled. | None |
| :SOURce:DM:SOURce <Source> | Set IQ Source. Selects the I/Q source driving the modulator (external inputs, internal baseband generator, or their sum). | Text: EXTernal,INTernal |
| :SOURce:DM:SOURce? | Read IQ Source. Reads the currently selected I/Q modulation source. | None |
| :SOURce:RADio:ARB:STATe ON | Turn On ARB. Enables the arbitrary waveform generator (dual ARB player). | None |
| :SOURce:RADio:ARB:STATe OFF | Turn Off ARB. Disables the arbitrary waveform generator. | None |
| :SOURce:RADio:ARB:STATe? | Read ARB State. Reads whether the ARB generator is enabled. | None |
| :SOURce:IQOut1:AWGN:STATe ON | Turn On AWGN. Adds additive white Gaussian noise to the output signal. | None |
| :SOURce:IQOut1:AWGN:STATe OFF | Turn Off AWGN. Removes the added AWGN from the output signal. | None |
| :SOURce:IQOut1:AWGN:BANDwidth <Freq> | Set AWGN Bandwidth. Sets the bandwidth of the added AWGN in Hz. | Number |
| :SOURce:AM:STATe ON | Turn On AM. Enables amplitude modulation. | None |
| :SOURce:AM:STATe OFF | Turn Off AM. Disables amplitude modulation. | None |
| :SOURce:AM:STATe? | Read AM State. Reads whether amplitude modulation is enabled. | None |
| :SOURce:AM:DEPTh:LINear <Percent> | Set AM Depth. Sets the linear AM depth as a percentage. | Number |
| :SOURce:AM:DEPTh:LINear? | Read AM Depth. Reads the linear AM depth percentage. | None |
| :SOURce:AM:SOURce <Source> | Set AM Source. Selects the source that generates the amplitude modulation. | Text: FUNCtion1,FUNCtion2,DUAL,NOISe1,NOISe2,EXTernal |
| :SOURce:AM:SOURce? | Read AM Source. Reads the currently selected AM source. | None |
| :SOURce:AM:INTernal:FUNCtion:FREQuency <Freq> | Set AM Internal Frequency. Sets the internal AM modulating frequency in Hz. | Number |
| :SOURce:AM:INTernal:FUNCtion:SHAPe <Shape> | Set AM Internal Shape. Sets the internal AM modulating waveform shape. | Text: SINE,TRIangle,PULSe,RAMP |
| :SOURce:PULM:STATe ON | Turn On Pulse Modulation. Enables pulse modulation. | None |
| :SOURce:PULM:STATe OFF | Turn Off Pulse Modulation. Disables pulse modulation. | None |
| :SOURce:PULM:STATe? | Read Pulse Modulation State. Reads whether pulse modulation is enabled. | None |
| :SOURce:PULM:SOURce <Source> | Set Pulse Source. Selects the internal pulse generator or an external pulse input. | Text: INTernal,EXTernal |
| :SOURce:PULM:SOURce? | Read Pulse Source. Reads the currently selected pulse modulation source. | None |
| :SOURce:PULM:INTernal:FREQuency <Freq> | Set Pulse Frequency. Sets the internal pulse repetition frequency in Hz. | Number |
| :SOURce:PULM:INTernal:PERiod <Sec> | Set Pulse Period. Sets the internal pulse period in seconds. | Number |
| :SOURce:PULM:INTernal:PERiod? | Read Pulse Period. Reads the internal pulse period in seconds. | None |
| :SOURce:PULM:INTernal:PWIDth <Sec> | Set Pulse Width. Sets the internal pulse width in seconds. | Number |
| :SOURce:PULM:INTernal:PWIDth? | Read Pulse Width. Reads the internal pulse width in seconds. | None |
| :SOURce:PULM:INTernal:DELay <Sec> | Set Pulse Delay. Sets the internal pulse delay in seconds. | Number |
| :SOURce:PULM:EXTernal:POLarity <Pol> | Set Pulse External Polarity. Sets the polarity of the external pulse modulation input. | Text: NORMal,INVerted |
| :SOURce:LFOutput:STATe ON | Turn On LF Output. Enables the low frequency (LF) output. | None |
| :SOURce:LFOutput:STATe OFF | Turn Off LF Output. Disables the low frequency (LF) output. | None |
| :SOURce:LFOutput:STATe? | Read LF Output State. Reads whether the LF output is enabled. | None |
| :SOURce:LFOutput:AMPLitude <Volt> | Set LF Amplitude. Sets the LF output amplitude in volts. | Number |
| :SOURce:LFOutput:AMPLitude? | Read LF Amplitude. Reads the LF output amplitude in volts. | None |
| :SOURce:LFOutput:FUNCtion:FREQuency <Freq> | Set LF Frequency. Sets the LF generator frequency in Hz. | Number |
| :SOURce:LFOutput:FUNCtion:FREQuency? | Read LF Frequency. Reads the LF generator frequency in Hz. | None |
| :SOURce:LFOutput:SOURce <Source> | Set LF Source. Selects the signal routed to the LF output connector. | Text: DC,FUNCtion |
| Command | What it does | Arguments |
|---|---|---|
| :OUTPut:STATe ON | Turn On RF Output. Enables the RF output signal. | None |
| :OUTPut:STATe OFF | Turn Off RF Output. Disables the RF output signal. | None |
| :OUTPut:STATe? | Read RF Output State. Reads whether the RF output is currently ON or OFF. | None |
| :OUTPut:MODulation:STATe ON | Turn On Modulation. Enables the modulation of the RF output signal (front-panel MOD ON/OFF). | None |
| :OUTPut:MODulation:STATe OFF | Turn Off Modulation. Disables the modulation of the RF output signal. | None |
| :OUTPut:MODulation:STATe? | Read Modulation State. Reads whether RF modulation is enabled. | None |
| :OUTPut:BLANking:AUTO ON | Turn On Output Blanking Auto. Lets the instrument decide automatically when to blank the RF output. | None |
| :OUTPut:BLANking:AUTO OFF | Turn Off Output Blanking Auto. Disables automatic RF output blanking control. | None |
| Command | What it does | Arguments |
|---|---|---|
| :MEMory:STATe:SAVE "<File>" | Save State. Stores the current instrument state to the named file. | Text |
| :MEMory:STATe:RECall "<File>" | Load State. Recalls an instrument state from the named file. | Text |
| Command | What it does | Arguments |
|---|---|---|
| :MMEMory:DELete <File> | Delete File. Deletes the named file from instrument memory. | Text |
| :MMEMory:CATalog? | List Files. Lists the files in the current instrument directory. | None |
| Command | What it does | Arguments |
|---|---|---|
| :SYSTem:ERRor:NEXt? | Read Error. Reads and removes the next entry from the error queue. | None |
| :SYSTem:PRESet | System Preset. Returns the instrument to its preset state. | None |
| Command | What it does | Arguments |
|---|---|---|
| <Output Variable>=<Equation> | Math. Variable equals an equation like (${Var_name}= ${Var_name}/2) | Number; Text |
| Command | What it does | Arguments |
|---|---|---|
| wait(<ms>) | Wait. Waits for number of milliseconds | Number |
| Command | What it does | Arguments |
|---|---|---|
| save2var <Variable_name> | Save2Variable. Saves last measurement to a variable | Text |
| Command | What it does | Arguments |
|---|---|---|
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). | None |
| *RST | Reset. Resets the instrument to its default state. | None |
| *CLS | Clear Status. Clears all event registers and the error queue. | None |
| *TST? | Self Test. Runs the self-test and returns 0 for pass or 1 for failure. | None |
| *OPC? | Operation Complete. Returns 1 when all pending operations are complete. | None |
| *WAI | Wait To Continue. Waits until all pending operations are complete before continuing. | None |
| *TRG | Trigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state. | None |
| *OPT? | Read Options. Returns the list of options installed in the instrument. | None |
This reference is generated from TestFlow's instrument library, which is drafted from Keysight's programming documentation for the M9383B and M9384B and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Keysight's programming manual: check it before you rely on an edge case. Last updated November 17, 2026.
Yes. The Keysight M9383B accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 95 SCPI commands for it: 32 queries that read values or state, and 63 settings and actions.
Install PyVISA and a VISA backend, find the instrument's address with ResourceManager().list_resources(), open it, then send commands with write() and read values with query(). The example on this page sends *IDN?, :OUTPut:STATe ON and :OUTPut:STATe?.
:OUTPut:STATe? (read rf output state). Reads whether the RF output is currently ON or OFF. The full list of queries is in the command reference on this page, grouped by subsystem.
Yes. TestFlow is an AI agent for electronics testing: you describe the test, and it builds the automation from this command library, runs it on the Keysight M9383B through the TestFlow desktop app, and writes the report from the measured results.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.