Vector Network Analyzer · SCPI command comparison

Rohde & Schwarz ZNA26 vs ZNL14: SCPI commands and remote control compared

In TestFlow's instrument library, the Rohde & Schwarz ZNA26 takes 59 SCPI commands, 13 of them queries, and the Rohde & Schwarz ZNL14 takes 26 SCPI commands, 3 of them queries. That is 33 more on the ZNA26. Counting distinct command headers (the command path without its arguments), 12 are accepted by both, 37 exist only on the ZNA26, and 9 only on the ZNL14. 24% of the ZNA26's command headers also exist on the ZNL14.

Both libraries have commands under SENSe, CALCulate, INITiate, SOURce, SYSTem, and TRIGger. Only the ZNA26 has DISPlay, OUTPut, MMEMory, and HCOPy. Only the ZNL14 has SPEctrum, SWEep, and FORM.

Only the ZNA26 library has an operation-complete command (*OPC?); the ZNL14 library has none. Only the ZNA26 library has an error-queue read (SYSTem:ERRor?); the ZNL14 library has none.

TestFlow's library gives the ZNA43, ZNA50, ZNA67, ZNB20, ZNB26, ZNB3000, ZNB4, ZNB40, ZNB43, ZNB8, ZNBT20, ZNBT26, ZNBT8, and ZND the same command set as the ZNA26, so the ZNA26 column applies to them too. TestFlow's library gives the ZNL20, ZNL3, ZNL4, and ZNL6 the same command set as the ZNL14, so the ZNL14 column applies to them too.

ZNA26 commands
59
ZNL14 commands
26
Shared headers
12
Unique headers
46

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz ZNA26 or Rohde & Schwarz ZNL14 and writes the report from the measured results.

Get started

ZNA26 vs ZNL14 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.

Rohde & Schwarz ZNA26Rohde & Schwarz ZNL14
Commands in TestFlow's library5926
Queries (read a value or state)133
Settings and actions4623
Subsystems1413
Distinct command headers4921
Headers the other lacks379
Command languageSCPISCPI
Operation complete*OPC?Not in library
Error queueSYSTem:ERRor?Not in library
Models on this command setZNA26, ZNA43, ZNA50, ZNA67, ZNB20, ZNB26, ZNB3000, ZNB4, ZNB40, ZNB43, ZNB8, ZNBT20, ZNBT26, ZNBT8, ZNDZNL14, ZNL20, ZNL3, ZNL4, ZNL6

Commands both accept

12 command headers are in both libraries. Where the ZNL14 library writes the command differently, its form is shown under the ZNA26's.

CommandWhat it does
SENSe:FREQuency:STARt <Frequency>ZNL14: SENS:FREQ:STARt <Start Freq>Set Start Freq. Sets the sweep start frequency in Hz.
CALCulate:FORMat <Format>ZNL14: CALC:FORMat <Format>Set Format. Sets the display format of the active trace.
INITiate:CONTinuous:ALL ONZNL14: INITiate:CONTinuous:ALL OFFContinuous On. Enables continuous sweep on all channels.
SOURce:POWer <Power>ZNL14: SOUR:POWer <Power level>Set Power Level. Sets the internal source power level in dBm.
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
SENSe:FREQuency:STOP <Frequency>ZNL14: SENS:FREQ:STOP <Stop freq>Set Stop Freq. Sets the sweep stop frequency in Hz.
CALCulate:DATA? FDATaZNL14: CALCulate:DATA? <Format>Read Formatted Data. Returns the formatted trace data of the active trace.
*RSTReset. Resets the instrument to its default state.
SENSe:FREQuency:CENTer <Frequency>ZNL14: SENS:FREQ:CENT <Center freq>Set Center Freq. Sets the sweep center frequency in Hz.
*CLSClear Status. Clears all event registers and the error queue.
SENSe:AVERage:STATe ONZNL14: SENS:AVER:STATe <ON|OFF>Average On. Enables trace averaging for the channel.
SENSe:AVERage:COUNt <Count>ZNL14: SENS:AVER:COUN <Count>Set Average Count. Sets the averaging factor (number of sweeps).

Only on the Rohde & Schwarz ZNA26

37 command headers in the ZNA26 library have no match in the ZNL14 library. Below are 19 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz ZNA26 command reference.

SENSe (12 only on the ZNA26)

CommandWhat it does
SENSe:FREQuency:SPAN <Frequency>Set Span Freq. Sets the sweep frequency span in Hz.
SENSe:FREQuency:CW <Frequency>Set CW Freq. Sets the CW (fixed) frequency in Hz.
SENSe:FREQuency:STARt?Read Start Freq. Returns the current start frequency in Hz.
SENSe:FREQuency:STOP?Read Stop Freq. Returns the current stop frequency in Hz.

CALCulate (9 only on the ZNA26)

CommandWhat it does
CALCulate:PARameter:SDEFine '<Name>','<Parameter>'Define Trace. Creates a trace with the given name and S-parameter (R&S SDEFine syntax).
CALCulate:PARameter:SELect '<Name>'Select Trace. Selects the trace as active for subsequent CALCulate commands.
CALCulate:PARameter:DELete '<Name>'Delete Trace. Deletes the named trace.
CALCulate:PARameter:DELete:ALLDelete All Traces. Deletes all traces in all channels.

IEEE 488.2 common (*) (4 only on the ZNA26)

CommandWhat it does
*TST?Self Test. Runs the self-test and returns 0 for pass or 1 for failure.
*OPC?Operation Complete. Returns 1 when all pending operations are complete.
*WAIWait To Continue. Waits until all pending operations are complete before continuing.
*TRGTrigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state.

DISPlay (3 only on the ZNA26)

CommandWhat it does
DISPlay:TRACe:Y:SCALe:AUTO ONCEAutoscale. Autoscales the active trace once to fit the diagram.
DISPlay:TRACe:Y:SCALe:PDIVision <Per_Div>Set Y Scale. Sets the vertical scale per division of the active trace.
DISPlay:TRACe:Y:SCALe:RLEVel <Level>Set Ref Level. Sets the reference level of the active trace.

MMEMory (2 only on the ZNA26)

CommandWhat it does
MMEMory:STORe:STATe 1,'<Filename>'Save State. Saves the instrument setup to the named recall set file.
MMEMory:LOAD:STATe 1,'<Filename>'Recall State. Loads an instrument setup from the named file.

SYSTem (2 only on the ZNA26)

CommandWhat it does
SYSTem:PRESetPreset. Presets the analyzer to the default setup.
SYSTem:ERRor:NEXT?Read Error. Reads the next entry from the error queue.

Only on the Rohde & Schwarz ZNL14

9 command headers in the ZNL14 library have no match in the ZNA26 library. Below are 9 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz ZNL14 command reference.

SPEctrum (4 only on the ZNL14)

CommandWhat it does
SPEctrum:FREQ:CENTer <Hz>SA mode Center frequency. Sets the center frequency in spectrum analyzer mode.
SPEctrum:SPAN <Hz>Span bandwidth. Sets the frequency span in spectrum analyzer mode.
SPEctrum:DETector <POS|NEG|AVERage>Detector type. Sets the detector type for spectrum measurements.
SPEctrum:REFLevel <dBm>SA display Reference. Sets the reference level for the spectrum display.

CALCulate (1 only on the ZNL14)

CommandWhat it does
CALCulate:PARameter:MEASure '<Trace>', '<Parameter>'Display parameter. Selects the S-parameter to display.

FORM (1 only on the ZNL14)

CommandWhat it does
FORM:DATA REAL,<32|64>Data output format. Sets the numeric data output format.

SWEep (1 only on the ZNL14)

CommandWhat it does
SWEep:TIME <seconds>Set sweep time. Sets the sweep time duration.

SYSTem (1 only on the ZNL14)

CommandWhat it does
SYSTem:LANGuage '<Language>'Language. Sets the instrument interface language.

TRIGger (1 only on the ZNL14)

CommandWhat it does
TRIGger:SEQuence:SOURce <Source>Trigger mode. Sets the trigger mode to automatic or manual.

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 SENSe:AVERage:STATe (average on); the ZNL14 library writes it as SENS:AVER:STATe ON. For the reading, both libraries hold CALCulate:DATA? (read formatted data), 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_ZNA26_ADDRESS")  # Rohde & Schwarz ZNA26
b = rm.open_resource("PASTE_ZNL14_ADDRESS")  # Rohde & Schwarz ZNL14
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Average On
a.write("SENSe:AVERage:STATe ON")
b.write("SENS:AVER:STATe ON")

# The same reading on both: Read Formatted Data
print(a.query("CALCulate:DATA? FDATa"))
print(b.query("CALCulate:DATA? FDATa"))

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz ZNA26 or Rohde & Schwarz ZNL14 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Rohde & Schwarz ZNA26 and the Rohde & Schwarz ZNL14 for remote control?

In TestFlow's library the ZNA26 has 59 SCPI commands and the ZNL14 has 26 SCPI commands. 12 command headers are common to both, 37 are only on the ZNA26 (mostly SENSe and CALCulate), and 9 are only on the ZNL14 (mostly SPEctrum and CALCulate).

Can I use the same SCPI code for the Rohde & Schwarz ZNA26 and the Rohde & Schwarz ZNL14?

Partly. 12 command headers are accepted by both, including SENSe:FREQuency:STARt, CALCulate:FORMat, and INITiate:CONTinuous:ALL. 46 are not, for example SENSe:FREQuency:SPAN on the ZNA26 and SPEctrum:FREQ:CENTer on the ZNL14, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the ZNA26 or the ZNL14?

The ZNA26: 59 commands for the ZNA26 against 26 for the ZNL14 in TestFlow's library. Of those, 13 on the ZNA26 and 3 on the ZNL14 are queries that read a value or state, and the library splits them into 14 and 13 subsystems.

How do the ZNA26 and ZNL14 signal operation complete and report errors?

Only the ZNA26 library has an operation-complete command (*OPC?); the ZNL14 library has none. Only the ZNA26 library has an error-queue read (SYSTem:ERRor?); the ZNL14 library has none. 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.