In TestFlow's instrument library, the Anritsu MS46122A takes 57 SCPI commands, 14 of them queries, and the Keysight E5061B takes 58 SCPI commands, 14 of them queries. That is 1 more on the E5061B. Counting distinct command headers (the command path without its arguments), 43 are accepted by both, 5 exist only on the MS46122A, and 6 only on the E5061B. 90% of the MS46122A's command headers also exist on the E5061B.
Both libraries have commands under SENSe, CALCulate, SYSTem, DISPlay, MMEMory, SOURce, TRIGger, and INITiate. Only the E5061B has OUTPut.
Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.
TestFlow's library gives the MS46122B, MS46131A, MS46322A, and MS46322B the same command set as the MS46122A, so the MS46122A column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MS46122A or Keysight E5061B 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 MS46122A | Keysight E5061B | |
|---|---|---|
| Commands in TestFlow's library | 57 | 58 |
| Queries (read a value or state) | 14 | 14 |
| Settings and actions | 43 | 44 |
| Subsystems | 12 | 13 |
| Distinct command headers | 48 | 49 |
| Headers the other lacks | 5 | 6 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | MS46122A, MS46122B, MS46131A, MS46322A, MS46322B | E5061B |
43 command headers are in both libraries. Here are 12, taken across subsystems. Where the E5061B library writes the command differently, its form is shown under the MS46122A's.
| Command | What it does |
|---|---|
| SENSe:FREQuency:STARt <Frequency> | Set Start Freq. Sets the sweep start frequency in Hz. |
| CALCulate:PARameter<Trace>:DEFine <Parameter> | Define Measurement. Creates a new measurement trace with the given name and S-parameter. |
| SYSTem:PRESet | Preset. Presets the analyzer to its default measurement state. |
| DISPlay:WINDow:TRACe:Y:SCALe:PDIVision <Per_Div> | Set Y Scale. Sets the vertical scale per division for the active trace. |
| MMEMory:STORe '<Filename>' | Save State. Saves the instrument state/data to the named file. |
| SOURce:POWer <Power> | Set Power Level. Sets the source output power level in dBm. |
| TRIGger:SOURce <Source> | Set Trigger Source. Sets the trigger source for the sweep. |
| INITiate:CONTinuous ON | Continuous On. Enables continuous (free-run) triggering. |
| *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:PARameter<Trace>:SELectE5061B: CALCulate:PARameter<Number>:SELect | Select By Number. Selects the active measurement by its trace number. |
| SYSTem:ERRor? | Read Error. Reads the next message from the error queue. |
5 command headers in the MS46122A library have no match in the E5061B library. Below are 5 of them from the 5 largest subsystems; the full list is in the Anritsu MS46122A command reference.
| Command | What it does |
|---|---|
| CALCulate:MARKer<Marker>:ACTivate ; ... | Marker Search Max. Moves the marker to the trace maximum. |
| Command | What it does |
|---|---|
| DISPlay:WINDow:TRACe:Y:AUTO | Autoscale. Autoscales the active trace to fit the display. |
| Command | What it does |
|---|---|
| SENSe:SWEep:TYPe <Type> | Set Sweep Type. Sets the sweep type (linear, log, segment, power, or CW). |
| Command | What it does |
|---|---|
| SYSTem:HOLD:RF ON | RF Power On. Turns the RF source power output on. |
| Command | What it does |
|---|---|
| TRIGger:SINGle | Trigger Single. Triggers a single sweep when not in continuous mode. |
6 command headers in the E5061B library have no match in the MS46122A library. Below are 6 of them from the 5 largest subsystems; the full list is in the Keysight E5061B command reference.
| Command | What it does |
|---|---|
| SENSe:SWEep:TYPE <Type> | Set Sweep Type. Sets the sweep type (linear, log, segment, power, or CW). |
| SENSe:SWEep:TIME <Seconds> | Set Sweep Time. Sets the sweep time in seconds. |
| Command | What it does |
|---|---|
| CALCulate:MARKer<Marker>:FUNCtion:TYPE MAXimum ; ... | Marker Search Max. Moves the marker to the trace maximum. |
| Command | What it does |
|---|---|
| DISPlay:WINDow:TRACe:Y:SCALe:AUTO | Autoscale. Autoscales the active trace to fit the display. |
| Command | What it does |
|---|---|
| INITiate:IMMediate | Trigger Single. Triggers a single sweep when not in continuous mode. |
| Command | What it does |
|---|---|
| OUTPut:STATe ON | RF Power On. Turns the RF source power output 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:AVERage:STATe (average on), and the same line runs on each. 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_MS46122A_ADDRESS") # Anritsu MS46122A
b = rm.open_resource("PASTE_E5061B_ADDRESS") # Keysight E5061B
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Average On
a.write("SENSe:AVERage:STATe ON")
b.write("SENSe:AVERage:STATe ON")
# 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 MS46122A or Keysight E5061B and writes the report from the measured results.
In TestFlow's library the MS46122A has 57 SCPI commands and the E5061B has 58 SCPI commands. 43 command headers are common to both, 5 are only on the MS46122A (mostly CALCulate and DISPlay), and 6 are only on the E5061B (mostly SENSe and CALCulate).
Partly. 43 command headers are accepted by both, including SENSe:FREQuency:STARt, CALCulate:PARameter<Trace>:DEFine, and SYSTem:PRESet. 11 are not, for example CALCulate:MARKer<Marker>:ACTivate on the MS46122A and SENSe:SWEep:TYPE on the E5061B, so a script that uses those needs a separate branch for each instrument.
The E5061B: 57 commands for the MS46122A against 58 for the E5061B in TestFlow's library. Of those, 14 on the MS46122A and 14 on the E5061B are queries that read a value or state, and the library splits them into 12 and 13 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.