In TestFlow's instrument library, the Keysight 33522B takes 123 SCPI commands, 17 of them queries, and the Siglent SDG2042X takes 77 SCPI commands, 9 of them queries. That is 46 more on the 33522B. Counting distinct command headers (the command path without its arguments), 10 are accepted by both, 91 exist only on the 33522B, and 16 only on the SDG2042X. 10% of the 33522B's command headers also exist on the SDG2042X.
Both libraries have commands under ROSCillator. Only the 33522B has SOURce, OUTPut, SYSTem, TRIGger, DISPlay, and MMEMory. Only the SDG2042X has C, COUP, BUZZ, and SCSV.
Both libraries synchronise with *OPC?. Only the 33522B library has an error-queue read (SYSTem:ERRor?); the SDG2042X library has none.
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 SDG6022X the same command set as the SDG2042X, so the SDG2042X column applies to it too.
Describe the test; TestFlow's agent uses these command sets to drive your Keysight 33522B or Siglent SDG2042X 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 | Siglent SDG2042X | |
|---|---|---|
| Commands in TestFlow's library | 123 | 77 |
| Queries (read a value or state) | 17 | 9 |
| Settings and actions | 106 | 68 |
| Subsystems | 11 | 9 |
| Distinct command headers | 101 | 26 |
| Headers the other lacks | 91 | 16 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | Not in library |
| Models on this command set | 33522B, 33612A | SDG2042X, SDG6022X |
10 command headers are in both libraries.
| Command | What it does |
|---|---|
| *IDN? | Identify. Returns the instrument identification string (manufacturer, model, serial, firmware). |
| *RST | Reset. Resets the instrument to its default state. |
| *CLS | Clear Status. Clears all event registers and the error queue. |
| *TST? | Self Test. Runs the self-test and returns 0 for pass. |
| *OPC? | Operation Complete. Returns 1 when all pending operations are complete. |
| *WAI | Wait To Continue. Waits until all pending operations are complete. |
| *TRG | Trigger Bus. Generates a bus trigger. |
| *SAV <Slot> | Save State Slot. Stores the current state to an internal memory slot (0 to 4). |
| *RCL <Slot> | Recall State Slot. Recalls a state from an internal memory slot (0 to 4). |
| *OPT? | Read Options. Queries the installed options. |
91 command headers in the 33522B library have no match in the SDG2042X library. Below are 18 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>:STATe ON | Turn On Output. Enables the selected channel output. |
| OUTPut<Channel>:STATe? | Read Output State. Reads whether the selected channel output is on. |
| 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. |
| Command | What it does |
|---|---|
| SYSTem:BEEPer:STATe ON | Enable Beeper. Enables the beeper. |
| SYSTem:BEEPer | Beep Now. Sounds the beeper once. |
| SYSTem:ERRor? | Read Error. Reads and clears the next error-queue entry. |
| SYSTem:VERSion? | Read SCPI Version. Returns the SCPI version. |
| 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 |
|---|---|
| DISPlay ON | Enable Display. Turns the front-panel display on. |
16 command headers in the SDG2042X library have no match in the 33522B library. Below are 8 of them from the 5 largest subsystems; the full list is in the Siglent SDG2042X command reference.
| Command | What it does |
|---|---|
| C<Channel>:OUTP ON | Turn On Output. Enables the selected channel output. |
| C<Channel>:OUTP? | Read Output State. Reads the selected channel output state and settings. |
| C<Channel>:BSWV WVTP,<Shape> | Set Function. Sets the basic waveform type for the selected channel. |
| C<Channel>:BSWV? | Read Basic Waveform. Reads all basic-waveform parameters for the selected channel. |
| Command | What it does |
|---|---|
| BUZZ ON | Buzzer On. Enables the buzzer. |
| Command | What it does |
|---|---|
| COUP TRACE,ON | Enable Channel Coupling. Enables channel tracking/coupling. |
| Command | What it does |
|---|---|
| ROSC INT | Set Clock Internal. Uses the internal reference clock. |
| Command | What it does |
|---|---|
| SCSV <Minutes> | Screen Save On. Enables the screen saver. |
With PyVISA and any VISA backend, this opens both instruments, identifies them, sends one setting, and reads one value from each. For the setting, the two libraries have no common command with a worked example on both, so each instrument uses its own: OUTPut:SYNC:STATe ON on the 33522B and C1:OUTP ON on the SDG2042X. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: SYSTem:ERRor? on the 33522B and *TST? on the SDG2042X. 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_SDG2042X_ADDRESS") # Siglent SDG2042X
for inst in (a, b):
inst.timeout = 5000 # ms
print(inst.query("*IDN?"))
# No shared setting with an example on both, so each uses its own command
a.write("OUTPut:SYNC:STATe ON") # Turn On Sync CH1
b.write("C1:OUTP ON") # Turn On Output
# No shared reading with an example on both, so each uses its own command
print(a.query("SYSTem:ERRor?")) # Read Error
print(b.query("*TST?")) # Self Test
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Keysight 33522B or Siglent SDG2042X and writes the report from the measured results.
In TestFlow's library the 33522B has 123 SCPI commands and the SDG2042X has 77 SCPI commands. 10 command headers are common to both, 91 are only on the 33522B (mostly SOURce and OUTPut), and 16 are only on the SDG2042X (mostly C and BUZZ).
Partly. 10 command headers are accepted by both. 107 are not, for example SOURce<Channel>:FUNCtion on the 33522B and C<Channel>:OUTP on the SDG2042X, so a script that uses those needs a separate branch for each instrument.
The 33522B: 123 commands for the 33522B against 77 for the SDG2042X in TestFlow's library. Of those, 17 on the 33522B and 9 on the SDG2042X are queries that read a value or state, and the library splits them into 11 and 9 subsystems.
Both libraries synchronise with *OPC?. Only the 33522B library has an error-queue read (SYSTem:ERRor?); the SDG2042X library has none. 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.