Phase Noise Analyzer · SCPI command comparison

AnaPico APPH20G vs Keysight E5052B: SCPI commands and remote control compared

In TestFlow's instrument library, the AnaPico APPH20G takes 184 SCPI commands, 67 of them queries, and the Keysight E5052B takes 160 SCPI commands, 24 of them queries. That is 24 more on the APPH20G. Counting distinct command headers (the command path without its arguments), 10 are accepted by both, 148 exist only on the APPH20G, and 123 only on the E5052B. 6% of the APPH20G's command headers also exist on the E5052B.

Both libraries have commands under SENSe, CALCulate, SYSTem, SOUR, INITiate, and ABORt. Only the E5052B has DISPlay, TRIGger, MMEMory, and FORMat.

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

TestFlow's library gives the APPH40G and APPH6040 the same command set as the APPH20G, so the APPH20G column applies to them too.

APPH20G commands
184
E5052B commands
160
Shared headers
10
Unique headers
271

Run this on your bench

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

Get started

APPH20G vs E5052B 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.

AnaPico APPH20GKeysight E5052B
Commands in TestFlow's library184160
Queries (read a value or state)6724
Settings and actions117136
Subsystems1014
Distinct command headers158133
Headers the other lacks148123
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setAPPH20G, APPH40G, APPH6040E5052B

Commands both accept

10 command headers are in both libraries.

CommandWhat it does
SYSTem:ERRor:NEXT?Read Error. Returns and removes the next entry in the error queue (0 = No error).
ABORtAbort Measurement. Aborts the measurement in progress.
*OPT?Read Options. Returns a comma-separated list of the installed options.
*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.
*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. Triggers the device if LAN is the selected trigger source (otherwise ignored).

Only on the AnaPico APPH20G

148 command headers in the APPH20G library have no match in the E5052B library. Below are 21 of them from the 6 largest subsystems; the full list is in the AnaPico APPH20G command reference.

SENSe (79 only on the APPH20G)

CommandWhat it does
SENSe:MODE <Mode>Set Measurement Mode. Selects the measurement mode: PN phase noise / VCO characterization / AN amplitude noise / FN frequency-noise based phase noise (BB and TRAN not yet available; *RST PN).
SENSe:MODE?Read Measurement Mode. Returns the active measurement mode.
SENSe:FREQuency:EXECuteStart Frequency Search. Starts the carrier frequency search (followed automatically by a power measurement); read results with CALCulate:FREQuency? and CALCulate:POWer?.
SENSe:POWer:EXECuteStart Power Measurement. Starts the carrier power measurement; read the result with CALCulate:POWer?.

CALCulate (39 only on the APPH20G)

CommandWhat it does
CALCulate:WAIT:AVERage ALLWait Measurement Complete. Blocks further SCPI requests until the measurement is complete (no timeout).
CALCulate:FREQuency?Read Detected Frequency. Returns the carrier frequency in Hz detected by the last frequency search.
CALCulate:POWer?Read Detected Power. Returns the carrier power level in dBm detected by the last frequency search.
CALCulate:PN:TRACe:FREQuency?Read PN Trace Frequency. Returns the offset frequency points in Hz of the most recent measurement as IEEE 488.2 block data (32-bit floats).

SYSTem (16 only on the APPH20G)

CommandWhat it does
SYSTem:ERRor:ALL?Read All Errors. Returns all entries in the error queue and clears it (0 = measurement ok).
SYSTem:RESTartRestart System. Restarts the instrument (same as a power cycle; terminates the connection).
SYSTem:COMMunicate:GPIB:ADDRess <Address>Set GPIB Address. Sets the GPIB address (1 to 30).
SYSTem:COMMunicate:GPIB:ADDRess?Read GPIB Address. Returns the GPIB address.

IEEE 488.2 common (*) (8 only on the APPH20G)

CommandWhat it does
*OPCOperation Complete Bit. Sets bit 0 of the Standard Event Status Register when all pending operations have finished.
*ESE <Value>Set Event Status Enable. Sets the Standard Event Status Enable register (0 to 255).
*ESR?Read Event Status. Returns the Standard Event Status Register.
*SRE <Value>Set Service Request Enable. Sets the Service Request Enable register (0 to 255).

SOUR (5 only on the APPH20G)

CommandWhat it does
SOUR:SUPP<Channel>:VOLT <Voltage>Set Supply Voltage. Sets the DUT DC supply voltage in V of supply channel 1 or 2 (0 to 15 V; manual VCO programming example).
SOUR:SUPP<Channel>:STAT ONSupply On. Turns the DUT DC supply of the channel on (manual VCO programming example).
SOURce:TUNE:DUT:VOLT <Voltage>Set DUT Tune Voltage. Sets the voltage in V at the DUT TUNE port (*RST 0).
SOURce:TUNE:DUT:VOLT?Read DUT Tune Voltage. Returns the configured DUT TUNE port voltage in V.

INITiate (1 only on the APPH20G)

CommandWhat it does
INITiate:IMMediateStart Measurement. Arms the trigger and starts the measurement in the active mode.

Only on the Keysight E5052B

123 command headers in the E5052B library have no match in the APPH20G library. Below are 24 of them from the 6 largest subsystems; the full list is in the Keysight E5052B command reference.

CALCulate (49 only on the E5052B)

CommandWhat it does
:CALCulate:PN1:DATA:CARRier?Measure Carrier. Returns the measured carrier frequency in Hz and power in dBm.
:CALCulate:PN1:DATA:XDATa?Read X Data. Returns the x-axis (offset frequency) data.
:CALCulate:PN1:DATA:RDATa?Read Raw Data. Returns the measurement raw data.
:CALCulate:PN1:DATA:PDATa?Read Raw Power Data. Returns the measurement raw power data.

SENSe (23 only on the E5052B)

CommandWhat it does
:SENSe:PN1:FREQuency:STARt <Frequency>Set Start Offset. Sets the start offset frequency in Hz (1, 10, 100 or 1k).
:SENSe:PN1:FREQuency:STOP <Frequency>Set Stop Offset. Sets the stop offset frequency in Hz (100k to 100M).
:SENSe:PN1:FREQuency:STARt?Read Start Offset. Returns the start offset frequency in Hz.
:SENSe:PN1:FREQuency:STOP?Read Stop Offset. Returns the stop offset frequency in Hz.

SOURce (18 only on the E5052B)

CommandWhat it does
:SOURce:VOLTage:CONTrol:LEVel:STATe ONVcontrol On. Turns the DC control voltage output on.
:SOURce:VOLTage:CONTrol:LEVel:AMPLitude <Voltage>Set Vcontrol. Sets the DC control voltage in V (-15 to 35).
:SOURce:VOLTage:CONTrol:LIMit:HIGH <Voltage>Set Vcontrol Limit High. Sets the upper limit of the DC control voltage in V.
:SOURce:VOLTage:CONTrol:LIMit:LOW <Voltage>Set Vcontrol Limit Low. Sets the lower limit of the DC control voltage in V.

DISPlay (14 only on the E5052B)

CommandWhat it does
:DISPlay:PN1:TRACe1:MODE <Mode>Set Trace Display. Selects data / memory / both trace display.
:DISPlay:PN1:TRACe1:LIMit:LINE ONLimit Line Display On. Turns the limit line display on.
:DISPlay:PN1:LIMit:FSIGn ONFail Sign On. Turns the limit test fail sign display on.
:DISPlay:PN1:TRACe1:Y:SCALe:AUTOAutoscale Y. Executes auto scale of the y-axis.

MMEMory (8 only on the E5052B)

CommandWhat it does
:MMEMory:LOAD:CORRection:POWer <FileName>Load Power Correction. Loads power correction data from a file (string in quotes).
:MMEMory:PN1:TRACe1:LOAD:LIMit:UPPer <FileName>Load Upper Limit. Loads the upper limit line from a file (string in quotes).
:MMEMory:PN1:TRACe1:LOAD:LIMit:LOWer <FileName>Load Lower Limit. Loads the lower limit line from a file (string in quotes).
:MMEMory:STORe:STATe <FileName>Save State. Saves the instrument settings to a file (string in quotes).

TRIGger (6 only on the E5052B)

CommandWhat it does
:TRIGger:MODE <Mode>Select Measurement Mode. Selects the measurement mode (PN1 = phase noise, SP1 = spectrum, FP1 = frequency/power, TR1 = transient, AM1 = AM noise, BB1 = baseband, PS1 = phase segment).
:TRIGger:PN1:SOURce <Source>Set Trigger Source. Selects the trigger source.
:TRIGger:AVERage ONTrigger Average On. Turns trigger system initialization of the average count on.
:TRIGger:EXTernal:SLOPe <Slope>Set External Trigger Slope. Selects the polarity of the external trigger.

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 ABORt (abort measurement), and the same line runs on each. For the reading, both libraries hold SYSTem:ERRor:NEXT? (read error), 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_APPH20G_ADDRESS")  # AnaPico APPH20G
b = rm.open_resource("PASTE_E5052B_ADDRESS")  # Keysight E5052B
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Abort Measurement
a.write("ABORt")
b.write(":ABORt")

# The same reading on both: Read Error
print(a.query("SYSTem:ERRor:NEXT?"))
print(b.query(":SYSTem:ERRor:NEXT?"))

a.close()
b.close()

Run this on your bench

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

Get started

Frequently asked questions

What is the difference between the AnaPico APPH20G and the Keysight E5052B for remote control?

In TestFlow's library the APPH20G has 184 SCPI commands and the E5052B has 160 SCPI commands. 10 command headers are common to both, 148 are only on the APPH20G (mostly SENSe and CALCulate), and 123 are only on the E5052B (mostly CALCulate and SENSe).

Can I use the same SCPI code for the AnaPico APPH20G and the Keysight E5052B?

Partly. 10 command headers are accepted by both, including SYSTem:ERRor:NEXT? and ABORt. 271 are not, for example SENSe:MODE on the APPH20G and :CALCulate:PN1:DATA:CARRier? on the E5052B, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the APPH20G or the E5052B?

The APPH20G: 184 commands for the APPH20G against 160 for the E5052B in TestFlow's library. Of those, 67 on the APPH20G and 24 on the E5052B are queries that read a value or state, and the library splits them into 10 and 14 subsystems.

How do the APPH20G and E5052B 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.