Vector Signal Generator · SCPI command comparison

Anritsu MG3710A vs Keysight M9383B: SCPI commands and remote control compared

In TestFlow's instrument library, the Anritsu MG3710A takes 176 SCPI commands, 53 of them queries, and the Keysight M9383B takes 95 SCPI commands, 32 of them queries. That is 81 more on the MG3710A. Counting distinct command headers (the command path without its arguments), 36 are accepted by both, 108 exist only on the MG3710A, and 44 only on the M9383B. 25% of the MG3710A's command headers also exist on the M9383B.

Both libraries have commands under SOURce, OUTPut, MMEMory, and SYSTem. Only the MG3710A has UNIT. Only the M9383B has MEMory.

Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.

TestFlow's library gives the MG3710E the same command set as the MG3710A, so the MG3710A column applies to it too. TestFlow's library gives the M9384B the same command set as the M9383B, so the M9383B column applies to it too.

MG3710A commands
176
M9383B commands
95
Shared headers
36
Unique headers
152

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MG3710A or Keysight M9383B and writes the report from the measured results.

Get started

MG3710A vs M9383B at a glance

Counts come from TestFlow's instrument library, the command sets its AI agent uses to drive each instrument. A distinct command header is the command path without its arguments, so :OUTPut ON and :OUTPut OFF count once.

Anritsu MG3710AKeysight M9383B
Commands in TestFlow's library17695
Queries (read a value or state)5332
Settings and actions12363
Subsystems99
Distinct command headers14480
Headers the other lacks10844
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setMG3710A, MG3710EM9383B, M9384B

Commands both accept

36 command headers are in both libraries. Here are 12, taken across subsystems.

CommandWhat it does
:SOURce:FREQuency:CW <Freq>Set Frequency. Sets the CW/fixed RF output frequency in Hz (100 kHz to 6 GHz depending on installed options).
:OUTPut:STATe ONTurn On RF Output. Enables the RF output of the selected signal generator.
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
:SOURce:FREQuency:CW?Read Frequency. Reads the current CW/fixed RF output frequency in Hz.
:OUTPut:STATe?Read RF Output State. Reads whether the RF output is currently ON or OFF.
*RSTReset. Resets the instrument to its default state.
:SOURce:FREQuency:OFFSet <Freq>Set Frequency Offset. Sets a frequency offset added to the displayed RF frequency.
:OUTPut:MODulation:STATe ONTurn On Modulation. Enables modulation of the RF output signal.
*CLSClear Status. Clears all event registers and the error queue.
:SOURce:FREQuency:OFFSet?Read Frequency Offset. Reads the current frequency offset in Hz.
:OUTPut:MODulation:STATe?Read Modulation State. Reads whether RF modulation is enabled.
*TST?Self Test. Runs the self-test and returns 0 for pass or 1 for failure.

Only on the Anritsu MG3710A

108 command headers in the MG3710A library have no match in the M9383B library. Below are 16 of them from the 5 largest subsystems; the full list is in the Anritsu MG3710A command reference.

SOURce (91 only on the MG3710A)

CommandWhat it does
:SOURce:FREQuency:MODE <Mode>Set Frequency Mode. Sets the frequency entry mode (fixed CW value or list sweep).
:SOURce:FREQuency:MODE?Read Frequency Mode. Reads the current frequency entry mode.
:SOURce:FREQuency:CENTer <Freq>Set Frequency Center. Sets the center frequency of the sweep range in Hz.
:SOURce:FREQuency:CENTer?Read Frequency Center. Reads the sweep center frequency in Hz.

MMEMory (7 only on the MG3710A)

CommandWhat it does
:MMEMory:STORe:STATe <File>Save State. Stores the current instrument state to the named file.
:MMEMory:LOAD:STATe <File>Load State. Recalls an instrument state from the named file.
:MMEMory:LOAD:LIST <File>Load List. Loads a frequency/level list from the named file.
:MMEMory:LOAD:WFM:ALLLoad All Waveforms. Loads all waveform patterns from storage into waveform memory.

SYSTem (6 only on the MG3710A)

CommandWhat it does
:SYSTem:ERRor:NEXT?Read Error. Reads and removes the next entry from the error queue.
:SYSTem:ERRor:CODE:NEXT?Read Error Code. Reads the numeric code of the next error queue entry.
:SYSTem:BEEPer ONTurn On Beeper. Enables the system beeper.
:SYSTem:LANGuage <Mode>Set Language Mode. Selects the remote command language mode used by the instrument.

OUTPut (2 only on the MG3710A)

CommandWhat it does
:OUTPut:PROTection:COUNt?Read Output Protection Count. Reads how many times the reverse power protection has tripped.
:OUTPut:PROTection:ERRor?Read Output Protection Error. Reads the reverse power protection error status.

UNIT (2 only on the MG3710A)

CommandWhat it does
:UNIT:POWer <Unit>Set Power Unit. Sets the unit used for RF level entry and display.
:UNIT:POWer?Read Power Unit. Reads the unit currently used for RF level display.

Only on the Keysight M9383B

44 command headers in the M9383B library have no match in the MG3710A library. Below are 11 of them from the 5 largest subsystems; the full list is in the Keysight M9383B command reference.

SOURce (37 only on the M9383B)

CommandWhat it does
:SOURce:FREQuency:MULTiplier?Read Frequency Multiplier. Reads the frequency multiplier factor.
:SOURce:POWer:LEVel:IMMediate:OFFSet?Read Power Offset. Reads the current RF power offset in dB.
:SOURce:POWer:ALC:STATe ONTurn On ALC. Enables the automatic level control (ALC) loop.
:SOURce:POWer:ALC:STATe?Read ALC State. Reads whether the ALC loop is enabled.

MEMory (2 only on the M9383B)

CommandWhat it does
:MEMory:STATe:SAVE "<File>"Save State. Stores the current instrument state to the named file.
:MEMory:STATe:RECall "<File>"Load State. Recalls an instrument state from the named file.

MMEMory (2 only on the M9383B)

CommandWhat it does
:MMEMory:DELete <File>Delete File. Deletes the named file from instrument memory.
:MMEMory:CATalog?List Files. Lists the files in the current instrument directory.

SYSTem (2 only on the M9383B)

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

OUTPut (1 only on the M9383B)

CommandWhat it does
:OUTPut:BLANking:AUTO ONTurn On Output Blanking Auto. Lets the instrument decide automatically when to blank the RF output.

Control both from Python

With PyVISA and any VISA backend, this opens both instruments, identifies them, sends one setting, and reads one value from each. For the setting, both libraries hold :OUTPut:STATe (turn on rf output), and the same line runs on each. For the reading, both libraries hold :OUTPut:STATe? (read rf output state), and the same line runs on each. For the basics, see the PyVISA tutorial.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find both VISA addresses

a = rm.open_resource("PASTE_MG3710A_ADDRESS")  # Anritsu MG3710A
b = rm.open_resource("PASTE_M9383B_ADDRESS")  # Keysight M9383B
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Turn On RF Output
a.write(":OUTPut:STATe ON")
b.write(":OUTPut:STATe ON")

# The same reading on both: Read RF Output State
print(a.query(":OUTPut:STATe?"))
print(b.query(":OUTPut:STATe?"))

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MG3710A or Keysight M9383B and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Anritsu MG3710A and the Keysight M9383B for remote control?

In TestFlow's library the MG3710A has 176 SCPI commands and the M9383B has 95 SCPI commands. 36 command headers are common to both, 108 are only on the MG3710A (mostly SOURce and MMEMory), and 44 are only on the M9383B (mostly SOURce and MEMory).

Can I use the same SCPI code for the Anritsu MG3710A and the Keysight M9383B?

Partly. 36 command headers are accepted by both, including :SOURce:FREQuency:CW, :OUTPut:STATe, and :SOURce:FREQuency:CW?. 152 are not, for example :SOURce:FREQuency:MODE on the MG3710A and :SOURce:FREQuency:MULTiplier? on the M9383B, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the MG3710A or the M9383B?

The MG3710A: 176 commands for the MG3710A against 95 for the M9383B in TestFlow's library. Of those, 53 on the MG3710A and 32 on the M9383B are queries that read a value or state, and the library splits them into 9 and 9 subsystems.

How do the MG3710A and M9383B signal operation complete and report errors?

Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?. Each command named here is listed in the tables on this page and on each instrument's command reference.

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.