In TestFlow's instrument library, the Anritsu MS2026C takes 29 SCPI commands, 6 of them queries, and the Keysight N9912A takes 51 SCPI commands, 13 of them queries. That is 22 more on the N9912A. Counting distinct command headers (the command path without its arguments), 18 are accepted by both, 6 exist only on the MS2026C, and 27 only on the N9912A. 75% of the MS2026C's command headers also exist on the N9912A.
Both libraries have commands under SENSe, CALCulate, INITiate, SOURce, and SYSTem. Only the N9912A has DISPlay, MMEMory, and TRIGger.
Both libraries synchronise with *OPC?. Only the N9912A library has an error-queue read (SYSTem:ERRor?); the MS2026C library has none.
TestFlow's library gives the MS2027C, MS2028C, MS2036C, MS2037C, and MS2038C the same command set as the MS2026C, so the MS2026C column applies to them too. TestFlow's library gives the N9913A, N9914A, N9915A, N9916A, N9917A, N9918A, N9923A, N9925A, N9926A, N9927A, and N9928A the same command set as the N9912A, so the N9912A column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MS2026C or Keysight N9912A 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.
| Anritsu MS2026C | Keysight N9912A | |
|---|---|---|
| Commands in TestFlow's library | 29 | 51 |
| Queries (read a value or state) | 6 | 13 |
| Settings and actions | 23 | 38 |
| Subsystems | 9 | 12 |
| Distinct command headers | 24 | 45 |
| Headers the other lacks | 6 | 27 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | Not in library | SYSTem:ERRor? |
| Models on this command set | MS2026C, MS2027C, MS2028C, MS2036C, MS2037C, MS2038C | N9912A, N9913A, N9914A, N9915A, N9916A, N9917A, N9918A, N9923A, N9925A, N9926A, N9927A, N9928A |
18 command headers are in both libraries. Here are 12, taken across subsystems. Where the N9912A library writes the command differently, its form is shown under the MS2026C's.
| Command | What it does |
|---|---|
| :SENSe:FREQuency:STARt <Frequency> | Set Start Freq. Sets the sweep start frequency in Hz. |
| :CALCulate<Trace>:FORMat <Format>N9912A: CALCulate:FORMat <Format> | Set Format. Sets the display format of the active trace. |
| :INITiate:CONTinuous ON | Continuous On. Enables continuous sweeping. |
| :SOURce:POWer <Power> | Set Power Level. Sets the source output power level in dBm. |
| :SYSTem:PRESet | Preset. Presets the instrument to default state. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| :SENSe:FREQuency:STOP <Frequency> | Set Stop Freq. Sets the sweep stop frequency in Hz. |
| :CALCulate:MARKer<Marker>:X <Frequency> | Set Marker X. Sets the marker stimulus position in Hz. |
| :INITiate:IMMediate | Trigger Single. Triggers a single sweep. |
| *RST | Reset. Resets the instrument to its default state. |
| :SENSe:FREQuency:CENTer <Frequency> | Set Center Freq. Sets the sweep center frequency in Hz. |
| :CALCulate:MARKer<Marker>:Y? | Read Marker Y. Returns the marker response value. |
6 command headers in the MS2026C library have no match in the N9912A library. Below are 6 of them from the 3 largest subsystems; the full list is in the Anritsu MS2026C command reference.
| Command | What it does |
|---|---|
| :SENSe:SWEep:IFBW <Bandwidth> | Set IF Bandwidth. Sets the IF bandwidth in Hz. |
| :SENSe:TRACe<Trace>:SELect | Set Active Trace. Selects the active trace number. |
| :SENSe:TRACe<Trace>:SPARams <Parameter> | Define Measurement. Assigns an S-parameter to the active trace. |
| Command | What it does |
|---|---|
| :CALCulate<Trace>:DATA? FDATa | Read Formatted Data. Returns the formatted trace data array. |
| :CALCulate:MARKer<Marker>:TYPE REFerence | Marker On. Turns on the specified marker. |
| Command | What it does |
|---|---|
| :INITiate:HOLD ON | Hold. Holds (stops) the current sweep. |
27 command headers in the N9912A library have no match in the MS2026C library. Below are 17 of them from the 6 largest subsystems; the full list is in the Keysight N9912A command reference.
| Command | What it does |
|---|---|
| CALCulate:PARameter<Trace>:DEFine <Parameter> | Define Measurement. Creates a new measurement trace with the given name and S-parameter. |
| CALCulate:PARameter<Number>:SELect | Select By Number. Selects the active measurement by its trace number. |
| CALCulate:FORMat? | Read Format. Returns the display/data format of the selected trace. |
| CALCulate:DATA:FDATa? | Read Formatted Data. Returns the formatted trace data array for the selected measurement. |
| Command | What it does |
|---|---|
| SENSe:SWEep:POINts? | Read Points. Returns the number of measurement points per sweep. |
| SENSe:SWEep:TIME <Seconds> | Set Sweep Time. Sets the sweep time in seconds. |
| SENSe:BANDwidth <Bandwidth> | Set IF Bandwidth. Sets the IF (resolution) bandwidth in Hz. |
| SENSe:BANDwidth? | Read IF Bandwidth. Returns the current IF bandwidth in Hz. |
| Command | What it does |
|---|---|
| DISPlay:WINDow:TRACe:Y:SCALe:AUTO | Autoscale. Autoscales the active trace to fit the display. |
| DISPlay:WINDow:TRACe:Y:SCALe:PDIVision <Per_Div> | Set Y Scale. Sets the vertical scale per division for the active trace. |
| DISPlay:WINDow:TRACe:Y:SCALe:RLEVel <Level> | Set Ref Level. Sets the reference level for the active trace. |
| Command | What it does |
|---|---|
| MMEMory:STORe:STATe '<Filename>' | Save State. Saves the instrument state/data to the named file. |
| MMEMory:LOAD:STATe '<Filename>' | Recall State. Recalls an instrument state from the named file. |
| MMEMory:STORe:IMAGe '<Filename>' | Save Screenshot. Saves a screenshot image to the named file. |
| Command | What it does |
|---|---|
| *CLS | Clear Status. Clears all event registers and the error queue. |
| *WAI | Wait To Continue. Waits until all pending operations are complete before continuing. |
| Command | What it does |
|---|---|
| SOURce:POWer? | Read Power Level. Returns the source output power level in dBm. |
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 :CALCulate<Trace>:FORMat (set format); the N9912A library writes it as CALCulate:FORMat MLOGarithmic. For the reading, both libraries hold :SENSe:FREQuency:STARt? (read start freq), 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_MS2026C_ADDRESS") # Anritsu MS2026C
b = rm.open_resource("PASTE_N9912A_ADDRESS") # Keysight N9912A
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Set Format
a.write(":CALCulate1-4:FORMat LMAGnitude")
b.write("CALCulate:FORMat MLOGarithmic")
# The same reading on both: Read Start Freq
print(a.query(":SENSe:FREQuency:STARt?"))
print(b.query("SENSe:FREQuency:STARt?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MS2026C or Keysight N9912A and writes the report from the measured results.
In TestFlow's library the MS2026C has 29 SCPI commands and the N9912A has 51 SCPI commands. 18 command headers are common to both, 6 are only on the MS2026C (mostly SENSe and CALCulate), and 27 are only on the N9912A (mostly CALCulate and SENSe).
Partly. 18 command headers are accepted by both, including :SENSe:FREQuency:STARt, :CALCulate<Trace>:FORMat, and :INITiate:CONTinuous. 33 are not, for example :SENSe:SWEep:IFBW on the MS2026C and CALCulate:PARameter<Trace>:DEFine on the N9912A, so a script that uses those needs a separate branch for each instrument.
The N9912A: 29 commands for the MS2026C against 51 for the N9912A in TestFlow's library. Of those, 6 on the MS2026C and 13 on the N9912A are queries that read a value or state, and the library splits them into 9 and 12 subsystems.
Both libraries synchronise with *OPC?. Only the N9912A library has an error-queue read (SYSTem:ERRor?); the MS2026C 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.