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.
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.
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 ZNA26 | Rohde & Schwarz ZNL14 | |
|---|---|---|
| Commands in TestFlow's library | 59 | 26 |
| Queries (read a value or state) | 13 | 3 |
| Settings and actions | 46 | 23 |
| Subsystems | 14 | 13 |
| Distinct command headers | 49 | 21 |
| Headers the other lacks | 37 | 9 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | Not in library |
| Error queue | SYSTem:ERRor? | Not in library |
| Models on this command set | ZNA26, ZNA43, ZNA50, ZNA67, ZNB20, ZNB26, ZNB3000, ZNB4, ZNB40, ZNB43, ZNB8, ZNBT20, ZNBT26, ZNBT8, ZND | ZNL14, ZNL20, ZNL3, ZNL4, ZNL6 |
12 command headers are in both libraries. Where the ZNL14 library writes the command differently, its form is shown under the ZNA26's.
| Command | What 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 OFF | Continuous 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. |
| *RST | Reset. 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. |
| *CLS | Clear 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). |
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.
| Command | What 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. |
| Command | What 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:ALL | Delete All Traces. Deletes all traces in all channels. |
| Command | What 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. |
| *WAI | Wait To Continue. Waits until all pending operations are complete before continuing. |
| *TRG | Trigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state. |
| Command | What it does |
|---|---|
| DISPlay:TRACe:Y:SCALe:AUTO ONCE | Autoscale. 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. |
| Command | What 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. |
| Command | What it does |
|---|---|
| SYSTem:PRESet | Preset. Presets the analyzer to the default setup. |
| SYSTem:ERRor:NEXT? | Read Error. Reads the next entry from the error queue. |
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.
| Command | What 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. |
| Command | What it does |
|---|---|
| CALCulate:PARameter:MEASure '<Trace>', '<Parameter>' | Display parameter. Selects the S-parameter to display. |
| Command | What it does |
|---|---|
| FORM:DATA REAL,<32|64> | Data output format. Sets the numeric data output format. |
| Command | What it does |
|---|---|
| SWEep:TIME <seconds> | Set sweep time. Sets the sweep time duration. |
| Command | What it does |
|---|---|
| SYSTem:LANGuage '<Language>' | Language. Sets the instrument interface language. |
| Command | What it does |
|---|---|
| TRIGger:SEQuence:SOURce <Source> | Trigger mode. Sets the trigger mode to automatic or manual. |
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()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.
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).
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.