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.
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.
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 APPH20G | Keysight E5052B | |
|---|---|---|
| Commands in TestFlow's library | 184 | 160 |
| Queries (read a value or state) | 67 | 24 |
| Settings and actions | 117 | 136 |
| Subsystems | 10 | 14 |
| Distinct command headers | 158 | 133 |
| Headers the other lacks | 148 | 123 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | APPH20G, APPH40G, APPH6040 | E5052B |
10 command headers are in both libraries.
| Command | What it does |
|---|---|
| SYSTem:ERRor:NEXT? | Read Error. Returns and removes the next entry in the error queue (0 = No error). |
| ABORt | Abort 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). |
| *RST | Reset. Resets the instrument to its default state. |
| *CLS | Clear 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. |
| *WAI | Wait To Continue. Waits until all pending operations are complete before continuing. |
| *TRG | Trigger Bus. Triggers the device if LAN is the selected trigger source (otherwise ignored). |
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.
| Command | What 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:EXECute | Start Frequency Search. Starts the carrier frequency search (followed automatically by a power measurement); read results with CALCulate:FREQuency? and CALCulate:POWer?. |
| SENSe:POWer:EXECute | Start Power Measurement. Starts the carrier power measurement; read the result with CALCulate:POWer?. |
| Command | What it does |
|---|---|
| CALCulate:WAIT:AVERage ALL | Wait 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). |
| Command | What it does |
|---|---|
| SYSTem:ERRor:ALL? | Read All Errors. Returns all entries in the error queue and clears it (0 = measurement ok). |
| SYSTem:RESTart | Restart 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. |
| Command | What it does |
|---|---|
| *OPC | Operation 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). |
| Command | What 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 ON | Supply 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. |
| Command | What it does |
|---|---|
| INITiate:IMMediate | Start Measurement. Arms the trigger and starts the measurement in the active mode. |
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.
| Command | What 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. |
| Command | What 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. |
| Command | What it does |
|---|---|
| :SOURce:VOLTage:CONTrol:LEVel:STATe ON | Vcontrol 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. |
| Command | What it does |
|---|---|
| :DISPlay:PN1:TRACe1:MODE <Mode> | Set Trace Display. Selects data / memory / both trace display. |
| :DISPlay:PN1:TRACe1:LIMit:LINE ON | Limit Line Display On. Turns the limit line display on. |
| :DISPlay:PN1:LIMit:FSIGn ON | Fail Sign On. Turns the limit test fail sign display on. |
| :DISPlay:PN1:TRACe1:Y:SCALe:AUTO | Autoscale Y. Executes auto scale of the y-axis. |
| Command | What 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). |
| Command | What 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 ON | Trigger 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. |
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()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.
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).
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.