Vector Signal Generator · SCPI command reference

Keysight M9383B and M9384B SCPI commands

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.

Commands
95
Queries
32
Subsystems
9
Models covered
2

Run this on your 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.

Get started

Control the Keysight M9383B from Python

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()

Run this on your 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.

Get started

Run a M9383B test without writing code

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.

Get started

SCPI command reference

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.

Source (SOURce) (70)

CommandWhat it doesArguments
: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 ONTurn On ALC. Enables the automatic level control (ALC) loop.None
:SOURce:POWer:ALC:STATe OFFTurn 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 ONTurn On Attenuator Auto. Couples the attenuator to the power level setting (automatic attenuator mode).None
:SOURce:POWer:ATTenuation:AUTO OFFTurn 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 ONTurn On Power Reference. Enables relative power mode using the stored power reference.None
:SOURce:POWer:REFerence:STATe OFFTurn 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 ONTurn On IQ Modulation. Enables the I/Q modulator.None
:SOURce:DM:STATe OFFTurn 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 ONTurn On ARB. Enables the arbitrary waveform generator (dual ARB player).None
:SOURce:RADio:ARB:STATe OFFTurn 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 ONTurn On AWGN. Adds additive white Gaussian noise to the output signal.None
:SOURce:IQOut1:AWGN:STATe OFFTurn 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 ONTurn On AM. Enables amplitude modulation.None
:SOURce:AM:STATe OFFTurn 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 ONTurn On Pulse Modulation. Enables pulse modulation.None
:SOURce:PULM:STATe OFFTurn 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 ONTurn On LF Output. Enables the low frequency (LF) output.None
:SOURce:LFOutput:STATe OFFTurn 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

Output (OUTPut) (8)

CommandWhat it doesArguments
:OUTPut:STATe ONTurn On RF Output. Enables the RF output signal.None
:OUTPut:STATe OFFTurn 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 ONTurn On Modulation. Enables the modulation of the RF output signal (front-panel MOD ON/OFF).None
:OUTPut:MODulation:STATe OFFTurn 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 ONTurn On Output Blanking Auto. Lets the instrument decide automatically when to blank the RF output.None
:OUTPut:BLANking:AUTO OFFTurn Off Output Blanking Auto. Disables automatic RF output blanking control.None

MEM subsystem (2)

CommandWhat it doesArguments
: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

Mass memory (MMEMory) (2)

CommandWhat it doesArguments
: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

System (SYSTem) (2)

CommandWhat it doesArguments
:SYSTem:ERRor:NEXt?Read Error. Reads and removes the next entry from the error queue.None
:SYSTem:PRESetSystem Preset. Returns the instrument to its preset state.None

Other subsystem (1)

CommandWhat it doesArguments
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

WAIT subsystem (1)

CommandWhat it doesArguments
wait(<ms>)Wait. Waits for number of millisecondsNumber

SAVE subsystem (1)

CommandWhat it doesArguments
save2var <Variable_name>Save2Variable. Saves last measurement to a variableText

IEEE 488.2 common commands (8)

CommandWhat it doesArguments
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).None
*RSTReset. Resets the instrument to its default state.None
*CLSClear 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
*WAIWait To Continue. Waits until all pending operations are complete before continuing.None
*TRGTrigger 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

Where these commands come from

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.

Frequently asked questions

Does the Keysight M9383B support SCPI remote control?

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.

How do I control the Keysight M9383B from Python?

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?.

Which command reads a value from the Keysight M9383B?

: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.

Can I automate the Keysight M9383B without writing code?

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.

Your next test, automated today

Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.