In TestFlow's instrument library, the Anritsu MG3710A takes 176 SCPI commands, 53 of them queries, and the Keysight N5172B takes 193 SCPI commands, 64 of them queries. That is 17 more on the N5172B. Counting distinct command headers (the command path without its arguments), 72 are accepted by both, 72 exist only on the MG3710A, and 96 only on the N5172B. 50% of the MG3710A's command headers also exist on the N5172B.
Both libraries have commands under SOURce, OUTPut, MMEMory, and SYSTem. Only the MG3710A has UNIT.
Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.
TestFlow's library gives the MG3710E the same command set as the MG3710A, so the MG3710A column applies to it too. TestFlow's library gives the N5182B the same command set as the N5172B, so the N5172B column applies to it too.
Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MG3710A or Keysight N5172B 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 MG3710A | Keysight N5172B | |
|---|---|---|
| Commands in TestFlow's library | 176 | 193 |
| Queries (read a value or state) | 53 | 64 |
| Settings and actions | 123 | 129 |
| Subsystems | 9 | 8 |
| Distinct command headers | 144 | 168 |
| Headers the other lacks | 72 | 96 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | MG3710A, MG3710E | N5172B, N5182B |
72 command headers are in both libraries. Here are 12, taken across subsystems.
| Command | What it does |
|---|---|
| :SOURce:FREQuency:MODE <Mode> | Set Frequency Mode. Sets the frequency entry mode (fixed CW value or list sweep). |
| :OUTPut:STATe ON | Turn On RF Output. Enables the RF output of the selected signal generator. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| :SOURce:FREQuency:MODE? | Read Frequency Mode. Reads the current frequency entry mode. |
| :OUTPut:STATe? | Read RF Output State. Reads whether the RF output is currently ON or OFF. |
| *RST | Reset. Resets the instrument to its default state. |
| :SOURce:FREQuency:CENTer <Freq> | Set Frequency Center. Sets the center frequency of the sweep range in Hz. |
| :OUTPut:MODulation:STATe ON | Turn On Modulation. Enables modulation of the RF output signal. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
| :SOURce:FREQuency:CENTer? | Read Frequency Center. Reads the sweep center frequency in Hz. |
| :OUTPut:MODulation:STATe? | Read Modulation State. Reads whether RF modulation is enabled. |
| *TST? | Self Test. Runs the self-test and returns 0 for pass or 1 for failure. |
72 command headers in the MG3710A library have no match in the N5172B library. Below are 16 of them from the 5 largest subsystems; the full list is in the Anritsu MG3710A command reference.
| Command | What it does |
|---|---|
| :SOURce:FREQuency:CW <Freq> | Set Frequency. Sets the CW/fixed RF output frequency in Hz (100 kHz to 6 GHz depending on installed options). |
| :SOURce:FREQuency:CW? | Read Frequency. Reads the current CW/fixed RF output frequency in Hz. |
| :SOURce:FREQuency:OFFSet:STATe ON | Turn On Frequency Offset. Applies the configured frequency offset to the displayed frequency. |
| :SOURce:FREQuency:MULTiplier:STATe ON | Turn On Frequency Multiplier. Applies the configured frequency multiplier to the displayed frequency. |
| Command | What it does |
|---|---|
| :MMEMory:STORe:STATe <File> | Save State. Stores the current instrument state to the named file. |
| :MMEMory:LOAD:STATe <File> | Load State. Recalls an instrument state from the named file. |
| :MMEMory:LOAD:LIST <File> | Load List. Loads a frequency/level list from the named file. |
| :MMEMory:LOAD:WFM:ALL | Load All Waveforms. Loads all waveform patterns from storage into waveform memory. |
| Command | What it does |
|---|---|
| :SYSTem:ERRor:NEXT? | Read Error. Reads and removes the next entry from the error queue. |
| :SYSTem:ERRor:CODE:NEXT? | Read Error Code. Reads the numeric code of the next error queue entry. |
| :SYSTem:BEEPer ON | Turn On Beeper. Enables the system beeper. |
| :SYSTem:LANGuage <Mode> | Set Language Mode. Selects the remote command language mode used by the instrument. |
| Command | What it does |
|---|---|
| :OUTPut:PROTection:COUNt? | Read Output Protection Count. Reads how many times the reverse power protection has tripped. |
| :OUTPut:PROTection:ERRor? | Read Output Protection Error. Reads the reverse power protection error status. |
| Command | What it does |
|---|---|
| :UNIT:POWer <Unit> | Set Power Unit. Sets the unit used for RF level entry and display. |
| :UNIT:POWer? | Read Power Unit. Reads the unit currently used for RF level display. |
96 command headers in the N5172B library have no match in the MG3710A library. Below are 15 of them from the 5 largest subsystems; the full list is in the Keysight N5172B command reference.
| Command | What it does |
|---|---|
| :SOURce:FREQuency:FIXed <Freq> | Set Frequency. Sets the CW/fixed RF output frequency in Hz (9 kHz to 6 GHz). |
| :SOURce:FREQuency:FIXed? | Read Frequency. Reads the current CW/fixed RF output frequency in Hz. |
| :SOURce:FREQuency:SPAN? | Read Frequency Span. Reads the sweep frequency span in Hz. |
| :SOURce:FREQuency:MULTiplier? | Read Frequency Multiplier. Reads the frequency multiplier factor. |
| Command | What it does |
|---|---|
| :SYSTem:ERRor:NEXt? | Read Error. Reads and removes the next entry from the error queue. |
| :SYSTem:PRESet | System Preset. Returns the instrument to its preset state. |
| :SYSTem:PRESet:TYPE <Type> | Set Preset Type. Selects whether preset restores the factory (normal) or a user-defined state. |
| :SYSTem:CAPability? | Read Capability. Returns the instrument capability string. |
| Command | What it does |
|---|---|
| :OUTPut:BLANking:STATe ON | Turn On Output Blanking. Enables RF output blanking so the RF is muted while the synthesizer settles. |
| :OUTPut:BLANking:STATe? | Read Output Blanking State. Reads the RF output blanking state. |
| :OUTPut:BLANking:AUTO ON | Turn On Output Blanking Auto. Lets the instrument decide automatically when to blank the RF output. |
| Command | What it does |
|---|---|
| *SAV <Reg>,<Seq> | Save State Slot. Saves the current instrument state to an internal register. |
| *RCL <Reg>,<Seq> | Recall State Slot. Recalls the instrument state from an internal register. |
| Command | What it does |
|---|---|
| :MMEMory:DELete <File> | Delete File. Deletes the named file from instrument memory. |
| :MMEMory:CATalog? | List Files. Lists the files in the current instrument directory. |
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 :OUTPut:STATe (turn on rf output), and the same line runs on each. For the reading, both libraries hold :OUTPut:STATe? (read rf output state), 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_MG3710A_ADDRESS") # Anritsu MG3710A
b = rm.open_resource("PASTE_N5172B_ADDRESS") # Keysight N5172B
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Turn On RF Output
a.write(":OUTPut:STATe ON")
b.write(":OUTPut:STATe ON")
# The same reading on both: Read RF Output State
print(a.query(":OUTPut:STATe?"))
print(b.query(":OUTPut:STATe?"))
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Anritsu MG3710A or Keysight N5172B and writes the report from the measured results.
In TestFlow's library the MG3710A has 176 SCPI commands and the N5172B has 193 SCPI commands. 72 command headers are common to both, 72 are only on the MG3710A (mostly SOURce and MMEMory), and 96 are only on the N5172B (mostly SOURce and SYSTem).
Partly. 72 command headers are accepted by both, including :SOURce:FREQuency:MODE, :OUTPut:STATe, and :SOURce:FREQuency:MODE?. 168 are not, for example :SOURce:FREQuency:CW on the MG3710A and :SOURce:FREQuency:FIXed on the N5172B, so a script that uses those needs a separate branch for each instrument.
The N5172B: 176 commands for the MG3710A against 193 for the N5172B in TestFlow's library. Of those, 53 on the MG3710A and 64 on the N5172B are queries that read a value or state, and the library splits them into 9 and 8 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.