Vector Network Analyzer · SCPI command comparison

Anritsu MS46122A vs Tektronix TTR503A: SCPI commands and remote control compared

In TestFlow's instrument library, the Anritsu MS46122A takes 57 SCPI commands, 14 of them queries, and the Tektronix TTR503A takes 47 SCPI commands, 6 of them queries. That is 10 more on the MS46122A. Counting distinct command headers (the command path without its arguments), 21 are accepted by both, 27 exist only on the MS46122A, and 16 only on the TTR503A. 44% of the MS46122A's command headers also exist on the TTR503A.

Both libraries have commands under SENSe, CALCulate, SYSTem, DISPlay, MMEMory, SOURce, TRIGger, and INITiate. Only the TTR503A has OUTPut and ABORt.

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. TestFlow's library gives the TTR506A the same command set as the TTR503A, so the TTR503A column applies to it too.

MS46122A commands
57
TTR503A commands
47
Shared headers
21
Unique headers
43

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MS46122A or Tektronix TTR503A and writes the report from the measured results.

Get started

MS46122A vs TTR503A 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.

Anritsu MS46122ATektronix TTR503A
Commands in TestFlow's library5747
Queries (read a value or state)146
Settings and actions4341
Subsystems1214
Distinct command headers4837
Headers the other lacks2716
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setMS46122A, MS46122B, MS46131A, MS46322A, MS46322BTTR503A, TTR506A

Commands both accept

21 command headers are in both libraries. Here are 12, taken across subsystems. Where the TTR503A library writes the command differently, its form is shown under the MS46122A's.

CommandWhat 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:ERRor?Read Error. Reads the next message from the error queue.
MMEMory:STORe '<Filename>'Save State. Saves the instrument state/data to the named file.
TRIGger:SOURce <Source>Set Trigger Source. Sets the trigger source for the sweep.
INITiate:CONTinuous ONTTR503A: INITiate:CONTinuous 1Continuous 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.
MMEMory:LOAD '<Filename>'Recall State. Recalls an instrument state from the named file.
*RSTReset. Resets the instrument to its default state.
SENSe:FREQuency:CENTer <Frequency>Set Center Freq. Sets the sweep center frequency in Hz.
*CLSClear Status. Clears all event registers and the error queue.

Only on the Anritsu MS46122A

27 command headers in the MS46122A library have no match in the TTR503A library. Below are 17 of them from the 6 largest subsystems; the full list is in the Anritsu MS46122A command reference.

CALCulate (10 only on the MS46122A)

CommandWhat it does
CALCulate:PARameter<Trace>:SELectSelect By Number. Selects the active measurement by its trace number.
CALCulate:FORMat <Format>Set Format. Sets the display/data format for the selected trace.
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.

SENSe (6 only on the MS46122A)

CommandWhat it does
SENSe:FREQuency:STARt?Read Start Freq. Returns the current start frequency in Hz.
SENSe:FREQuency:STOP?Read Stop Freq. Returns the current stop frequency in Hz.
SENSe:SWEep:POINts?Read Points. Returns the number of measurement points per sweep.
SENSe:SWEep:TYPe <Type>Set Sweep Type. Sets the sweep type (linear, log, segment, power, or CW).

DISPlay (3 only on the MS46122A)

CommandWhat it does
DISPlay:WINDow:TRACe:Y:AUTOAutoscale. 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.

IEEE 488.2 common (*) (2 only on the MS46122A)

CommandWhat it does
*TST?Self Test. Runs the self-test and returns 0 for pass or 1 for failure.
*TRGTrigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state.

SOURce (2 only on the MS46122A)

CommandWhat it does
SOURce:POWer <Power>Set Power Level. Sets the source output power level in dBm.
SOURce:POWer?Read Power Level. Returns the source output power level in dBm.

SYSTem (2 only on the MS46122A)

CommandWhat it does
SYSTem:HOLD:RF ONRF Power On. Turns the RF source power output on.
SYSTem:PRESetPreset. Presets the analyzer to its default measurement state.

Only on the Tektronix TTR503A

16 command headers in the TTR503A library have no match in the MS46122A library. Below are 11 of them from the 6 largest subsystems; the full list is in the Tektronix TTR503A command reference.

CALCulate (8 only on the TTR503A)

CommandWhat it does
CALCulate:PARameter:COUNt <Count>Set Param Count. Sets the number of measurement parameters (traces) for the channel.
CALCulate:SELected:FORMat <Format>Set Format. Sets the display/data format of the selected trace.
CALCulate:SELected:DATA:FDATa?Read Formatted Data. Returns the formatted trace data array of the selected trace.
CALCulate:SELected:DATA:SDATa?Read Complex Data. Returns the complex (real/imag) trace data of the selected trace.

DISPlay (2 only on the TTR503A)

CommandWhat it does
DISPlay:CHANnel:TRACe:Y:SCALe:AUTOAutoscale. Autoscales the selected trace to fit the display.
DISPlay:ENABle 1Display Enable. Enables display updates.

SENSe (2 only on the TTR503A)

CommandWhat it does
SENSe:SWEep:TYPE <Type>Set Sweep Type. Sets the sweep type.
SENSe:BANDwidth:RESolution <Bandwidth>Set IF Bandwidth. Sets the IF bandwidth in Hz.

ABORt (1 only on the TTR503A)

CommandWhat it does
ABORtAbort. Resets the trigger system and stops the current measurement.

INITiate (1 only on the TTR503A)

CommandWhat it does
INITiate:IMMediateTrigger Single. Triggers a single sweep when not in continuous mode.

OUTPut (1 only on the TTR503A)

CommandWhat it does
OUTPut:STATe 1RF Power On. Turns the RF source power output on.

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 SENSe:AVERage:STATe (average on); the TTR503A library writes it as SENSe:AVERage:STATe 1. For the reading, both libraries hold SYSTem:ERRor? (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_MS46122A_ADDRESS")  # Anritsu MS46122A
b = rm.open_resource("PASTE_TTR503A_ADDRESS")  # Tektronix TTR503A
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 1")

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

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MS46122A or Tektronix TTR503A and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Anritsu MS46122A and the Tektronix TTR503A for remote control?

In TestFlow's library the MS46122A has 57 SCPI commands and the TTR503A has 47 SCPI commands. 21 command headers are common to both, 27 are only on the MS46122A (mostly CALCulate and SENSe), and 16 are only on the TTR503A (mostly CALCulate and DISPlay).

Can I use the same SCPI code for the Anritsu MS46122A and the Tektronix TTR503A?

Partly. 21 command headers are accepted by both, including SENSe:FREQuency:STARt, CALCulate:PARameter<Trace>:DEFine, and SYSTem:ERRor?. 43 are not, for example CALCulate:PARameter<Trace>:SELect on the MS46122A and CALCulate:PARameter:COUNt on the TTR503A, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the MS46122A or the TTR503A?

The MS46122A: 57 commands for the MS46122A against 47 for the TTR503A in TestFlow's library. Of those, 14 on the MS46122A and 6 on the TTR503A are queries that read a value or state, and the library splits them into 12 and 14 subsystems.

How do the MS46122A and TTR503A 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.