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.
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.
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 | Tektronix TTR503A | |
|---|---|---|
| Commands in TestFlow's library | 57 | 47 |
| Queries (read a value or state) | 14 | 6 |
| Settings and actions | 43 | 41 |
| Subsystems | 12 | 14 |
| Distinct command headers | 48 | 37 |
| Headers the other lacks | 27 | 16 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | MS46122A, MS46122B, MS46131A, MS46322A, MS46322B | TTR503A, TTR506A |
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.
| 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: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 1 | 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. |
| MMEMory:LOAD '<Filename>' | Recall State. Recalls an instrument state from the named file. |
| *RST | Reset. Resets the instrument to its default state. |
| SENSe:FREQuency:CENTer <Frequency> | Set Center Freq. Sets the sweep center frequency in Hz. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
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.
| Command | What it does |
|---|---|
| CALCulate:PARameter<Trace>:SELect | Select 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. |
| Command | What 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). |
| Command | What it does |
|---|---|
| DISPlay:WINDow:TRACe:Y: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 |
|---|---|
| *TST? | Self Test. Runs the self-test and returns 0 for pass or 1 for failure. |
| *TRG | Trigger Bus. Generates a bus trigger when the instrument is in wait-for-trigger state. |
| Command | What 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. |
| Command | What it does |
|---|---|
| SYSTem:HOLD:RF ON | RF Power On. Turns the RF source power output on. |
| SYSTem:PRESet | Preset. Presets the analyzer to its default measurement state. |
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.
| Command | What 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. |
| Command | What it does |
|---|---|
| DISPlay:CHANnel:TRACe:Y:SCALe:AUTO | Autoscale. Autoscales the selected trace to fit the display. |
| DISPlay:ENABle 1 | Display Enable. Enables display updates. |
| Command | What 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. |
| Command | What it does |
|---|---|
| ABORt | Abort. Resets the trigger system and stops the current measurement. |
| Command | What it does |
|---|---|
| INITiate:IMMediate | Trigger Single. Triggers a single sweep when not in continuous mode. |
| Command | What it does |
|---|---|
| OUTPut:STATe 1 | 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); 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()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.
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).
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.
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.
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.