In TestFlow's instrument library, the Keysight 33522B takes 123 SCPI commands, 17 of them queries, and the Tektronix AFG31022 takes 95 SCPI commands, 12 of them queries. That is 28 more on the 33522B. Counting distinct command headers (the command path without its arguments), 50 are accepted by both, 51 exist only on the 33522B, and 31 only on the AFG31022. 50% of the 33522B's command headers also exist on the AFG31022.
Both libraries have commands under SOURce, OUTPut, SYSTem, TRIGger, and DISPlay. Only the 33522B has ROSCillator and MMEMory.
Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.
TestFlow's library gives the 33612A the same command set as the 33522B, so the 33522B column applies to it too. TestFlow's library gives the AFG3102C, AFG31052, AFG31102, AFG31152, AFG31252, and AFG3252C the same command set as the AFG31022, so the AFG31022 column applies to them too.
Describe the test; TestFlow's agent uses these command sets to drive your Keysight 33522B or Tektronix AFG31022 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.
| Keysight 33522B | Tektronix AFG31022 | |
|---|---|---|
| Commands in TestFlow's library | 123 | 95 |
| Queries (read a value or state) | 17 | 12 |
| Settings and actions | 106 | 83 |
| Subsystems | 11 | 9 |
| Distinct command headers | 101 | 81 |
| Headers the other lacks | 51 | 31 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | 33522B, 33612A | AFG31022, AFG3102C, AFG31052, AFG31102, AFG31152, AFG31252, AFG3252C |
50 command headers are in both libraries. Here are 12, taken across subsystems.
| Command | What it does |
|---|---|
| SOURce<Channel>:FREQuency:MODE CW | Set Frequency Mode Fixed. Sets the selected channel to fixed (continuous-wave) frequency mode. |
| OUTPut<Channel>:STATe ON | Turn On Output. Enables the selected channel output. |
| SYSTem:BEEPer:STATe ON | Enable Beeper. Enables the beeper. |
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| SOURce<Channel>:VOLTage:UNIT <Unit> | Set Voltage Unit. Sets the amplitude unit for the selected channel. |
| OUTPut<Channel>:STATe? | Read Output State. Reads whether the selected channel output is on. |
| SYSTem:ERRor? | Read Error. Reads and clears the next error-queue entry. |
| *RST | Reset. Resets the instrument to its default state. |
| SOURce<Channel>:FUNCtion:RAMP:SYMMetry <Pct> | Set Ramp Symmetry. Sets the ramp symmetry percentage (0 to 100) for the selected channel. |
| OUTPut<Channel>:POLarity NORMal | Set Output Polarity Normal. Sets the selected channel output polarity to normal. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
| SOURce<Channel>:AM:STATe ON | Enable AM. Enables AM modulation on the selected channel. |
51 command headers in the 33522B library have no match in the AFG31022 library. Below are 16 of them from the 6 largest subsystems; the full list is in the Keysight 33522B command reference.
| Command | What it does |
|---|---|
| SOURce<Channel>:FUNCtion <Shape> | Set Function. Sets the output waveform shape for the selected channel. |
| SOURce<Channel>:FUNCtion? | Read Function. Reads the output waveform shape for the selected channel. |
| SOURce<Channel>:FREQuency <Freq> | Set Frequency. Sets the output frequency in Hz for the selected channel. |
| SOURce<Channel>:FREQuency? | Read Frequency. Reads the output frequency for the selected channel. |
| Command | What it does |
|---|---|
| OUTPut<Channel>:LOAD <Ohm> | Set Output Load. Sets the expected output load in ohms (1 to 10k) for the selected channel; use INF for high-Z. |
| OUTPut<Channel>:LOAD? | Read Output Load. Reads the output load setting for the selected channel. |
| OUTPut<Channel>:POLarity? | Read Output Polarity. Reads the selected channel output polarity. |
| OUTPut:SYNC:STATe ON | Turn On Sync CH1. Enables the front-panel Sync output. |
| Command | What it does |
|---|---|
| TRIGger:SOURce <Src> | Set Trigger Source. Sets the trigger source. |
| TRIGger:SLOPe <Slope> | Set Trigger Slope. Sets the external trigger slope. |
| TRIGger | Trigger Now. Issues an immediate trigger. |
| Command | What it does |
|---|---|
| MMEMory:STORe:STATe <File> | Save State. Stores the instrument state to a file. |
| MMEMory:LOAD:STATe <File> | Load State. Loads an instrument state file. |
| Command | What it does |
|---|---|
| SYSTem:BEEPer | Beep Now. Sounds the beeper once. |
| SYSTem:VERSion? | Read SCPI Version. Returns the SCPI version. |
| Command | What it does |
|---|---|
| DISPlay ON | Enable Display. Turns the front-panel display on. |
31 command headers in the AFG31022 library have no match in the 33522B library. Below are 11 of them from the 4 largest subsystems; the full list is in the Tektronix AFG31022 command reference.
| Command | What it does |
|---|---|
| SOURce<Channel>:FUNCtion:SHAPe <Shape> | Set Function. Sets the output waveform shape for the selected channel. |
| SOURce<Channel>:FUNCtion:SHAPe? | Read Function. Reads the output waveform shape for the selected channel. |
| SOURce<Channel>:FREQuency:FIXed <Freq> | Set Frequency. Sets the output frequency in Hz for the selected channel. |
| SOURce<Channel>:FREQuency:FIXed? | Read Frequency. Reads the output frequency for the selected channel. |
| Command | What it does |
|---|---|
| TRIGger:SEQuence:SOURce <Src> | Set Trigger Source. Sets the trigger source. |
| TRIGger:SEQuence:SLOPe <Slope> | Set Trigger Slope. Sets the external trigger slope. |
| TRIGger:SEQuence:TIMer <Sec> | Set Trigger Timer. Sets the internal trigger timer period. |
| TRIGger:SEQuence:IMMediate | Trigger Now. Issues an immediate (manual) trigger. |
| Command | What it does |
|---|---|
| OUTPut<Channel>:IMPedance <Ohm> | Set Output Impedance. Sets the the selected channel output load impedance in ohms (1 to 10k). |
| OUTPut<Channel>:IMPedance? | Read Output Impedance. Reads the the selected channel output load impedance. |
| Command | What it does |
|---|---|
| DISPlay:BRIGhtness <Level> | Enable Display. Sets the display brightness (0 to 1). |
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 SOURce<Channel>:FREQuency:MODE (set frequency mode fixed), and the same line runs on each. 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_33522B_ADDRESS") # Keysight 33522B
b = rm.open_resource("PASTE_AFG31022_ADDRESS") # Tektronix AFG31022
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# The same setting on both: Set Frequency Mode Fixed
a.write("SOURce1:FREQuency:MODE CW")
b.write("SOURce1:FREQuency:MODE CW")
# 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 Keysight 33522B or Tektronix AFG31022 and writes the report from the measured results.
In TestFlow's library the 33522B has 123 SCPI commands and the AFG31022 has 95 SCPI commands. 50 command headers are common to both, 51 are only on the 33522B (mostly SOURce and OUTPut), and 31 are only on the AFG31022 (mostly SOURce and TRIGger).
Partly. 50 command headers are accepted by both, including SOURce<Channel>:FREQuency:MODE, OUTPut<Channel>:STATe, and SYSTem:BEEPer:STATe. 82 are not, for example SOURce<Channel>:FUNCtion on the 33522B and SOURce<Channel>:FUNCtion:SHAPe on the AFG31022, so a script that uses those needs a separate branch for each instrument.
The 33522B: 123 commands for the 33522B against 95 for the AFG31022 in TestFlow's library. Of those, 17 on the 33522B and 12 on the AFG31022 are queries that read a value or state, and the library splits them into 11 and 9 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.