In TestFlow's instrument library, the Siglent SDG1032X takes 74 SCPI commands, 9 of them queries, and the Tektronix AFG1022 takes 67 SCPI commands, 10 of them queries. That is 7 more on the SDG1032X. Counting distinct command headers (the command path without its arguments), 8 are accepted by both, 17 exist only on the SDG1032X, and 48 only on the AFG1022. 32% of the SDG1032X's command headers also exist on the AFG1022.
Only the SDG1032X has C, COUP, ROSC, BUZZ, and SCSV. Only the AFG1022 has SOURce, OUTPut, and SYSTem.
Only the SDG1032X library has an operation-complete command (*OPC?); the AFG1022 library has none. Only the AFG1022 library has an error-queue read (SYSTem:ERRor?); the SDG1032X library has none.
TestFlow's library gives the AFG1062 the same command set as the AFG1022, so the AFG1022 column applies to it too.
Describe the test; TestFlow's agent uses these command sets to drive your Siglent SDG1032X or Tektronix AFG1022 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.
| Siglent SDG1032X | Tektronix AFG1022 | |
|---|---|---|
| Commands in TestFlow's library | 74 | 67 |
| Queries (read a value or state) | 9 | 10 |
| Settings and actions | 65 | 57 |
| Subsystems | 9 | 7 |
| Distinct command headers | 25 | 56 |
| Headers the other lacks | 17 | 48 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | Not in library |
| Error queue | Not in library | SYSTem:ERRor? |
| Models on this command set | SDG1032X | AFG1022, AFG1062 |
8 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. |
| *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 a memory slot. |
| *RCL <Slot> | Recall State Slot. Recalls a state from a memory slot. |
| *OPT? | Read Options. Queries the installed options. |
17 command headers in the SDG1032X library have no match in the AFG1022 library. Below are 10 of them from the 6 largest subsystems; the full list is in the Siglent SDG1032X 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 |
|---|---|
| *TST? | Self Test. Runs the self-test and returns 0 for pass. |
| *OPC? | Operation Complete. Returns 1 when all pending operations are complete. |
| 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. |
48 command headers in the AFG1022 library have no match in the SDG1032X library. Below are 9 of them from the 3 largest subsystems; the full list is in the Tektronix AFG1022 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 |
|---|---|
| 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>: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 |
|---|---|
| SYSTem:ERRor? | Read Error. Reads and clears the next error-queue entry. |
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: C1:OUTP ON on the SDG1032X and OUTPut1:STATe ON on the AFG1022. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: *TST? on the SDG1032X and SYSTem:ERRor? on the AFG1022. 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_SDG1032X_ADDRESS") # Siglent SDG1032X
b = rm.open_resource("PASTE_AFG1022_ADDRESS") # Tektronix AFG1022
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("C1:OUTP ON") # Turn On Output
b.write("OUTPut1:STATe ON") # Turn On Output
# No shared reading with an example on both, so each uses its own command
print(a.query("*TST?")) # Self Test
print(b.query("SYSTem:ERRor?")) # Read Error
a.close()
b.close()Describe the test; TestFlow's agent uses these command sets to drive your Siglent SDG1032X or Tektronix AFG1022 and writes the report from the measured results.
In TestFlow's library the SDG1032X has 74 SCPI commands and the AFG1022 has 67 SCPI commands. 8 command headers are common to both, 17 are only on the SDG1032X (mostly C and IEEE 488.2 common (*)), and 48 are only on the AFG1022 (mostly SOURce and OUTPut).
Partly. 8 command headers are accepted by both. 65 are not, for example C<Channel>:OUTP on the SDG1032X and SOURce<Channel>:FUNCtion:SHAPe on the AFG1022, so a script that uses those needs a separate branch for each instrument.
The SDG1032X: 74 commands for the SDG1032X against 67 for the AFG1022 in TestFlow's library. Of those, 9 on the SDG1032X and 10 on the AFG1022 are queries that read a value or state, and the library splits them into 9 and 7 subsystems.
Only the SDG1032X library has an operation-complete command (*OPC?); the AFG1022 library has none. Only the AFG1022 library has an error-queue read (SYSTem:ERRor?); the SDG1032X 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.