In TestFlow's instrument library, the Keysight E4440A takes 86 SCPI commands, 20 of them queries, and the Keysight N9020B takes 103 SCPI commands, 22 of them queries. That is 17 more on the N9020B. Counting distinct command headers (the command path without its arguments), 70 are accepted by both, 4 exist only on the E4440A, and 17 only on the N9020B. 95% of the E4440A's command headers also exist on the N9020B.
Both libraries have commands under SENSe, CALCulate, DISPlay, INITiate, CONFigure, READ, TRACe, and TRIGger, plus 7 more roots. Neither has a command root the other lacks: the differences are inside shared subsystems.
Both libraries synchronise with *OPC?. Neither library has an error-queue read such as SYSTem:ERRor?.
TestFlow's library gives the E4443A, E4445A, E4446A, E4447A, and E4448A the same command set as the E4440A, so the E4440A column applies to them too. 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.
Describe the test; TestFlow's agent uses these command sets to drive your Keysight E4440A or Keysight N9020B 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.
| Keysight E4440A | Keysight N9020B | |
|---|---|---|
| Commands in TestFlow's library | 86 | 103 |
| Queries (read a value or state) | 20 | 22 |
| Settings and actions | 66 | 81 |
| Subsystems | 19 | 19 |
| Distinct command headers | 74 | 87 |
| Headers the other lacks | 4 | 17 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | Not in library | Not in library |
| Models on this command set | E4440A, E4443A, E4445A, E4446A, E4447A, E4448A | N9020B, N9021B, N9030B, N9038A, N9040B, N9041B, N9048B |
70 command headers are in both libraries. Here are 12, taken across subsystems.
| Command | What it does |
|---|---|
| :SENSe:FREQuency:CENTer <Frequency> | Set Center Freq. Sets the center frequency of the displayed span in Hz. |
| :CALCulate:MARKer<MkrNum>:STATe ON | Marker On. Turns on the specified marker. |
| :DISPlay:WINDow:TRACe:Y:SCALe:RLEVel <Level> | Set Ref Level. Sets the reference level (top of the display grid) in the current Y units. |
| :INITiate:CONTinuous ON | Continuous Sweep On. Sets the analyzer to continuous (free-run) sweep mode. |
| :CONFigure:CHPower | Config Channel Power. Configures the analyzer for the Channel Power (CHP) measurement. |
| :READ:CHPower? | Read Channel Power. Initiates and reads the channel power and power-spectral-density result. |
| :TRACe:DATA? <TraceName> | Read Trace Data. Reads back the amplitude data points of the specified trace. |
| :TRIGger:SOURce <Source> | Set Trigger Source. Selects the sweep trigger source. |
| :INSTrument:SELect SA | Select SA Mode. Selects the basic Spectrum Analyzer measurement personality. |
| :UNIT:POWer <Units> | Set Y Units. Sets the amplitude (Y-axis) units for power readouts. |
| :ABORt | Abort. Aborts the current sweep or measurement in progress. |
| :INPut:COUPling <Coupling> | Set Input Coupling. Sets the RF input coupling to AC or DC. |
4 command headers in the E4440A library have no match in the N9020B library. Below are 4 of them from the 4 largest subsystems; the full list is in the Keysight E4440A command reference.
| Command | What it does |
|---|---|
| :DISPlay:WINDow:TRACe:Y:SCALe:SPACing <Spacing> | Set Y Scale Type. Sets the vertical scale to logarithmic or linear. |
| Command | What it does |
|---|---|
| :FORMat:DATA <Format> | Set Trace Format. Sets the numeric data format used when transferring trace data. |
| Command | What it does |
|---|---|
| :SENSe:DETector:FUNCtion <Detector> | Set Detector. Sets the detector type used to reduce sweep data to trace points. |
| Command | What it does |
|---|---|
| :TRACe<TraceNum>:MODE <TraceMode> | Set Trace Mode. Sets the update mode for the specified trace (clear-write/max-hold/min-hold/view/blank). |
17 command headers in the N9020B library have no match in the E4440A library. Below are 14 of them from the 6 largest subsystems; the full list is in the Keysight N9020B command reference.
| Command | What it does |
|---|---|
| :CALCulate:MARKer<MkrNum>:MAXimum:LEFT | Marker Peak Left. Moves the specified marker to the next peak to the left. |
| :CALCulate:MARKer<MkrNum>:MAXimum:RIGHt | Marker Peak Right. Moves the specified marker to the next peak to the right. |
| :CALCulate:MARKer<MkrNum>:FUNCtion:BAND:SPAN <Span> | Set Marker Band Span. Sets the integration bandwidth (band span) for the marker band power function. |
| :CALCulate:MARKer:PEAK:TABLe:STATe ON | Peak Table On. Turns on the peak table display listing detected signal peaks. |
| Command | What it does |
|---|---|
| :SENSe:DETector:TRACe <Detector> | Set Detector. Sets the detector type used to reduce sweep data to trace points. |
| :SENSe:CORRection:IMPedance:INPut:MAGNitude <Impedance> | Set Input Impedance. Sets the input impedance reference (50 or 75 ohms) for amplitude correction. |
| :SENSe:CORRection:SA:GAIN <Gain> | Set Ext Gain. Sets an external gain/loss correction value applied to displayed amplitudes in dB. |
| Command | What it does |
|---|---|
| :CONFigure:TOI | Config TOI. Configures the analyzer for the third-order intercept (TOI) measurement. |
| :CONFigure:HARMonics | Config Harmonics. Configures the analyzer for the harmonic distortion measurement. |
| Command | What it does |
|---|---|
| :READ:TOI? | Read TOI. Initiates and reads the third-order intercept measurement results. |
| :READ:HARMonics:DISTortion? | Read Harmonics. Initiates and reads the total harmonic distortion result. |
| Command | What 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 ON | Set Trace Update On. Enables live updating of the specified trace. |
| Command | What it does |
|---|---|
| :DISPlay:ENABle ON | Display All On. Turns the front-panel display update on. |
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:FREQuency:SPAN:FULL (set full span), and the same line runs on each. For the reading, both libraries hold :READ:CHPower? (read channel power), 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_E4440A_ADDRESS") # Keysight E4440A
b = rm.open_resource("PASTE_N9020B_ADDRESS") # Keysight N9020B
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Set Full Span
a.write(":SENSe:FREQuency:SPAN:FULL")
b.write(":SENSe:FREQuency:SPAN:FULL")
# The same reading on both: Read Channel Power
print(a.query(":READ:CHPower?"))
print(b.query(":READ:CHPower?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Keysight E4440A or Keysight N9020B and writes the report from the measured results.
In TestFlow's library the E4440A has 86 SCPI commands and the N9020B has 103 SCPI commands. 70 command headers are common to both, 4 are only on the E4440A (mostly DISPlay and FORMat), and 17 are only on the N9020B (mostly CALCulate and SENSe).
Partly. 70 command headers are accepted by both, including :SENSe:FREQuency:CENTer, :CALCulate:MARKer<MkrNum>:STATe, and :DISPlay:WINDow:TRACe:Y:SCALe:RLEVel. 21 are not, for example :DISPlay:WINDow:TRACe:Y:SCALe:SPACing on the E4440A and :CALCulate:MARKer<MkrNum>:MAXimum:LEFT on the N9020B, so a script that uses those needs a separate branch for each instrument.
The N9020B: 86 commands for the E4440A against 103 for the N9020B in TestFlow's library. Of those, 20 on the E4440A and 22 on the N9020B are queries that read a value or state, and the library splits them into 19 and 19 subsystems.
Both libraries synchronise with *OPC?. 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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.