Vector Signal Generator · SCPI command comparison

Keysight E8267D vs N5172B: SCPI commands and remote control compared

In TestFlow's instrument library, the Keysight E8267D takes 130 SCPI commands, 39 of them queries, and the Keysight N5172B takes 193 SCPI commands, 64 of them queries. That is 63 more on the N5172B. Counting distinct command headers (the command path without its arguments), 102 are accepted by both, 8 exist only on the E8267D, and 66 only on the N5172B. 93% of the E8267D's command headers also exist on the N5172B.

Both libraries have commands under SOURce, OUTPut, MMEMory, and SYSTem. Neither has a command root the other lacks: the differences are inside shared subsystems.

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

TestFlow's library gives the N5182B the same command set as the N5172B, so the N5172B column applies to it too.

E8267D commands
130
N5172B commands
193
Shared headers
102
Unique headers
74

Run this on your bench

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

Get started

E8267D vs N5172B 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.

Keysight E8267DKeysight N5172B
Commands in TestFlow's library130193
Queries (read a value or state)3964
Settings and actions91129
Subsystems88
Distinct command headers110168
Headers the other lacks866
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setE8267DN5172B, N5182B

Commands both accept

102 command headers are in both libraries. Here are 12, taken across subsystems. Where the N5172B library writes the command differently, its form is shown under the E8267D's.

CommandWhat it does
:SOURce:FREQuency:FIXed <Freq>Set Frequency. Sets the CW/fixed RF output frequency in Hz (100 kHz to 44 GHz depending on installed options).
:OUTPut:STATe ONTurn On RF Output. Enables the RF output signal.
:MMEMory:DELete <File>Delete File. Deletes the named file from instrument memory.
:SYSTem:ERRor:NEXt?Read Error. Reads and removes the next entry from the error queue.
*SAV <Register>,<Sequence>N5172B: *SAV <Reg>,<Seq>Save State Slot. Saves the current instrument state to an internal register.
:SOURce:FREQuency:FIXed?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.
:MMEMory:CATalog?List Files. Lists the files in the current instrument directory.
:SYSTem:PRESetSystem Preset. Returns the instrument to its preset state.
*RCL <Register>,<Sequence>N5172B: *RCL <Reg>,<Seq>Recall State Slot. Recalls the instrument state from an internal register.
:SOURce:FREQuency:MODE <Mode>Set Frequency Mode. Sets the frequency entry mode (fixed CW value, analog sweep, or list).
:OUTPut:MODulation:STATe ONTurn On Modulation. Enables the modulation of the RF output signal.

Only on the Keysight E8267D

8 command headers in the E8267D library have no match in the N5172B library. Below are 5 of them from the 2 largest subsystems; the full list is in the Keysight E8267D command reference.

SOURce (7 only on the E8267D)

CommandWhat it does
:SOURce:FREQuency:MANual <Freq>Set Frequency Manual. Sets the frequency output when the sweep is in manual mode.
:SOURce:FREQuency:MANual?Read Frequency Manual. Reads the manual sweep frequency in Hz.
:SOURce:FREQuency:OFFSet:STATe ONTurn On Frequency Offset. Applies the configured frequency offset to the displayed frequency.
:SOURce:LIST:DWELl:TYPE <Type>Set List Dwell Type. Selects whether dwell times come from the list table or the step sweep setting.

OUTPut (1 only on the E8267D)

CommandWhat it does
:OUTPut:PROTection:STATe ONTurn On Output Protection. Enables the reverse power protection on the RF output.

Only on the Keysight N5172B

66 command headers in the N5172B library have no match in the E8267D library. Below are 9 of them from the 3 largest subsystems; the full list is in the Keysight N5172B command reference.

SOURce (61 only on the N5172B)

CommandWhat it does
:SOURce:FREQuency:OFFSet?Read Frequency Offset. Reads the current frequency offset value in Hz.
:SOURce:POWer:STARt?Read Power Start. Reads the power sweep start level in dBm.
:SOURce:POWer:STOP?Read Power Stop. Reads the power sweep stop level in dBm.
:SOURce:POWer:REFerence <Power>Set Power Reference. Sets the RF power reference level in dBm used for relative power display.

OUTPut (3 only on the N5172B)

CommandWhat it does
:OUTPut:BLANking:STATe ONTurn On Output Blanking. Enables RF output blanking so the RF is muted while the synthesizer settles.
:OUTPut:BLANking:STATe?Read Output Blanking State. Reads the RF output blanking state.
:OUTPut:BLANking:AUTO ONTurn On Output Blanking Auto. Lets the instrument decide automatically when to blank the RF output.

SYSTem (2 only on the N5172B)

CommandWhat it does
:SYSTem:PRESet:TYPE <Type>Set Preset Type. Selects whether preset restores the factory (normal) or a user-defined state.
:SYSTem:CAPability?Read Capability. Returns the instrument capability string.

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_E8267D_ADDRESS")  # Keysight E8267D
b = rm.open_resource("PASTE_N5172B_ADDRESS")  # Keysight N5172B
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 Keysight E8267D or Keysight N5172B and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Keysight E8267D and the Keysight N5172B for remote control?

In TestFlow's library the E8267D has 130 SCPI commands and the N5172B has 193 SCPI commands. 102 command headers are common to both, 8 are only on the E8267D (mostly SOURce and OUTPut), and 66 are only on the N5172B (mostly SOURce and OUTPut).

Can I use the same SCPI code for the Keysight E8267D and the Keysight N5172B?

Partly. 102 command headers are accepted by both, including :SOURce:FREQuency:FIXed, :OUTPut:STATe, and :MMEMory:DELete. 74 are not, for example :SOURce:FREQuency:MANual on the E8267D and :SOURce:FREQuency:OFFSet? on the N5172B, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the E8267D or the N5172B?

The N5172B: 130 commands for the E8267D against 193 for the N5172B in TestFlow's library. Of those, 39 on the E8267D and 64 on the N5172B are queries that read a value or state, and the library splits them into 8 and 8 subsystems.

How do the E8267D and N5172B 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.