Spectrum Analyzer · SCPI command comparison

Keysight N9020B vs Rohde & Schwarz FPC1000: SCPI commands and remote control compared

In TestFlow's instrument library, the Keysight N9020B takes 103 SCPI commands, 22 of them queries, and the Rohde & Schwarz FPC1000 takes 40 SCPI commands, 11 of them queries. That is 63 more on the N9020B. Counting distinct command headers (the command path without its arguments), 4 are accepted by both, 83 exist only on the N9020B, and 25 only on the FPC1000. 5% of the N9020B's command headers also exist on the FPC1000.

Both libraries have commands under DISPlay, INITiate, and INPut. Only the N9020B has SENSe, CALCulate, CONFigure, READ, TRACe, and INSTrument and 6 more. Only the FPC1000 has FREQuency, BANDwidth, and SWEep.

Only the N9020B library has an operation-complete command (*OPC?); the FPC1000 library has none. Neither library has an error-queue read such as SYSTem:ERRor?.

TestFlow's library gives the N9021B, N9030B, N9038A, N9040B, N9041B, and N9048B the same command set as the N9020B, so the N9020B column applies to them too.

N9020B commands
103
FPC1000 commands
40
Shared headers
4
Unique headers
108

Run this on your bench

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

Get started

N9020B vs FPC1000 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 N9020BRohde & Schwarz FPC1000
Commands in TestFlow's library10340
Queries (read a value or state)2211
Settings and actions8129
Subsystems199
Distinct command headers8729
Headers the other lacks8325
Command languageSCPISCPI
Operation complete*OPC?Not in library
Error queueNot in libraryNot in library
Models on this command setN9020B, N9021B, N9030B, N9038A, N9040B, N9041B, N9048BFPC1000

Commands both accept

4 command headers are in both libraries. Where the FPC1000 library writes the command differently, its form is shown under the N9020B's.

CommandWhat it does
:DISPlay:WINDow:TRACe:Y:SCALe:RLEVel <Level>FPC1000: DISPlay:WINDow:TRACe:Y:SCALe:RLEVel <dBm>Set Ref Level. Sets the reference level (top of the display grid) in the current Y units.
:INITiate:CONTinuous ONContinuous Sweep On. Sets the analyzer to continuous (free-run) sweep mode.
:DISPlay:WINDow:TRACe:Y:SCALe:RLEVel?Get Ref Level. Queries the current reference level.
:INITiate:IMMediateInitiate Sweep. Triggers a new sweep/measurement (single-shot when not continuous).

Only on the Keysight N9020B

83 command headers in the N9020B library have no match in the FPC1000 library. Below are 23 of them from the 6 largest subsystems; the full list is in the Keysight N9020B command reference.

SENSe (35 only on the N9020B)

CommandWhat it does
:SENSe:FREQuency:CENTer <Frequency>Set Center Freq. Sets the center frequency of the displayed span in Hz.
:SENSe:FREQuency:CENTer?Get Center Freq. Queries the current center frequency in Hz.
:SENSe:FREQuency:STARt <Frequency>Set Start Freq. Sets the start (left edge) frequency of the sweep in Hz.
:SENSe:FREQuency:STARt?Get Start Freq. Queries the start frequency in Hz.

CALCulate (17 only on the N9020B)

CommandWhat it does
:CALCulate:MARKer<MkrNum>:STATe ONMarker On. Turns on the specified marker.
:CALCulate:MARKer<MkrNum>:X <Position>Set Marker X. Sets the X-axis (frequency or time) position of the specified marker.
:CALCulate:MARKer<MkrNum>:X?Get Marker X. Queries the X-axis position (frequency/time) of the specified marker.
:CALCulate:MARKer<MkrNum>:Y?Get Marker Y. Queries the Y-axis amplitude value at the specified marker.

IEEE 488.2 common (*) (7 only on the N9020B)

CommandWhat it does
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
*RSTReset. Resets the instrument to its default state.
*CLSClear Status. Clears all event registers and the error queue.
*TST?Self Test. Runs the self-test and returns 0 for pass or 1 for failure.

CONFigure (5 only on the N9020B)

CommandWhat it does
:CONFigure:CHPowerConfig Channel Power. Configures the analyzer for the Channel Power (CHP) measurement.
:CONFigure:ACPowerConfig ACP. Configures the analyzer for the Adjacent Channel Power (ACP) measurement.
:CONFigure:OBWidthConfig OBW. Configures the analyzer for the Occupied Bandwidth (OBW) measurement.
:CONFigure:TOIConfig TOI. Configures the analyzer for the third-order intercept (TOI) measurement.

READ (5 only on the N9020B)

CommandWhat it does
:READ:CHPower?Read Channel Power. Initiates and reads the channel power and power-spectral-density result.
:READ:ACPower?Read ACP. Initiates and reads the adjacent channel power ratio results.
:READ:OBWidth?Read OBW. Initiates and reads the occupied bandwidth result.
:READ:TOI?Read TOI. Initiates and reads the third-order intercept measurement results.

TRACe (3 only on the N9020B)

CommandWhat it does
:TRACe<TraceNum>:TYPE <TraceType>Set Trace Type. Sets the update type for the specified trace (clear-write/average/max-hold/min-hold).
:TRACe<TraceNum>:UPDate:STATe ONSet Trace Update On. Enables live updating of the specified trace.
:TRACe:DATA? <TraceName>Read Trace Data. Reads back the amplitude data points of the specified trace.

Only on the Rohde & Schwarz FPC1000

25 command headers in the FPC1000 library have no match in the N9020B library. Below are 18 of them from the 5 largest subsystems; the full list is in the Rohde & Schwarz FPC1000 command reference.

FREQuency (8 only on the FPC1000)

CommandWhat it does
FREQuency:CENTer <Hz>Set Center Frequency. Sets the center frequency in Hz.
FREQuency:CENTer?Read Center Frequency. Queries the current center frequency.
FREQuency:SPAN <Hz>Set Span. Sets the frequency span in Hz.
FREQuency:SPAN?Read Span. Queries the current frequency span.

BANDwidth (6 only on the FPC1000)

CommandWhat it does
BANDwidth:RESolution <Hz>Set RBW. Sets the resolution bandwidth in Hz.
BANDwidth:RESolution?Read RBW. Queries the current resolution bandwidth.
BANDwidth:RESolution:AUTO ONSet RBW Auto. Enables automatic resolution bandwidth selection.
BANDwidth:VIDeo <Hz>Set VBW. Sets the video bandwidth in Hz.

INPut (5 only on the FPC1000)

CommandWhat it does
INPut:ATTenuation <dB>Set Input Attenuation. Sets the input attenuation in dB.
INPut:ATTenuation?Read Input Attenuation. Queries the current input attenuation.
INPut:ATTenuation:AUTO ONSet Input Attenuation Auto. Enables automatic input attenuation control.
INPut:GAIN:STATe ONPreamp On. Enables the input preamplifier.

SWEep (4 only on the FPC1000)

CommandWhat it does
SWEep:TIME <Sec>Set Sweep Time. Sets the sweep time in seconds.
SWEep:TIME?Read Sweep Time. Queries the current sweep time.
SWEep:TIME:AUTO ONSet Sweep Time Auto. Enables automatic sweep time calculation.
SWEep:COUNt <N>Set Average Count. Sets the number of sweep averages.

DISPlay (2 only on the FPC1000)

CommandWhat it does
DISPlay:WINDow:TRACe:MODE AVERageAverage On. Enables sweep averaging.
DISPlay:WINDow:TRACe:MODE?Read Average State. Queries whether sweep averaging is enabled.

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 :INITiate:CONTinuous (continuous sweep on), and the same line runs on each. For the reading, both libraries hold :DISPlay:WINDow:TRACe:Y:SCALe:RLEVel? (get ref level), 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_N9020B_ADDRESS")  # Keysight N9020B
b = rm.open_resource("PASTE_FPC1000_ADDRESS")  # Rohde & Schwarz FPC1000
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Continuous Sweep On
a.write(":INITiate:CONTinuous ON")
b.write("INITiate:CONTinuous ON")

# The same reading on both: Get Ref Level
print(a.query(":DISPlay:WINDow:TRACe:Y:SCALe:RLEVel?"))
print(b.query("DISPlay:WINDow:TRACe:Y:SCALe:RLEVel?"))

a.close()
b.close()

Run this on your bench

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

Get started

Frequently asked questions

What is the difference between the Keysight N9020B and the Rohde & Schwarz FPC1000 for remote control?

In TestFlow's library the N9020B has 103 SCPI commands and the FPC1000 has 40 SCPI commands. 4 command headers are common to both, 83 are only on the N9020B (mostly SENSe and CALCulate), and 25 are only on the FPC1000 (mostly FREQuency and BANDwidth).

Can I use the same SCPI code for the Keysight N9020B and the Rohde & Schwarz FPC1000?

Partly. 4 command headers are accepted by both, including :DISPlay:WINDow:TRACe:Y:SCALe:RLEVel, :INITiate:CONTinuous, and :DISPlay:WINDow:TRACe:Y:SCALe:RLEVel?. 108 are not, for example :SENSe:FREQuency:CENTer on the N9020B and FREQuency:CENTer on the FPC1000, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the N9020B or the FPC1000?

The N9020B: 103 commands for the N9020B against 40 for the FPC1000 in TestFlow's library. Of those, 22 on the N9020B and 11 on the FPC1000 are queries that read a value or state, and the library splits them into 19 and 9 subsystems.

How do the N9020B and FPC1000 signal operation complete and report errors?

Only the N9020B library has an operation-complete command (*OPC?); the FPC1000 library has none. Neither library has an error-queue read such as 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.