Function Generator · SCPI command comparison

Rigol DG1022Z vs Siglent SDG1032X: SCPI commands and remote control compared

In TestFlow's instrument library, the Rigol DG1022Z takes 201 SCPI commands, 49 of them queries, and the Siglent SDG1032X takes 74 SCPI commands, 9 of them queries. That is 127 more on the DG1022Z. Counting distinct command headers (the command path without its arguments), 9 are accepted by both, 171 exist only on the DG1022Z, and 16 only on the SDG1032X. 5% of the DG1022Z's command headers also exist on the SDG1032X.

Both libraries have commands under COUPling and ROSCillator. Only the DG1022Z has SOURce, OUTPut, COUNter, DISPlay, MMEMory, and HCOPy and 2 more. Only the SDG1032X has C, BUZZ, and SCSV.

Both libraries synchronise with *OPC?. Only the DG1022Z library has an error-queue read (SYSTem:ERRor?); the SDG1032X library has none.

TestFlow's library gives the DG1032Z the same command set as the DG1022Z, so the DG1022Z column applies to it too.

DG1022Z commands
201
SDG1032X commands
74
Shared headers
9
Unique headers
187

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rigol DG1022Z or Siglent SDG1032X and writes the report from the measured results.

Get started

DG1022Z vs SDG1032X at a glance

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.

Rigol DG1022ZSiglent SDG1032X
Commands in TestFlow's library20174
Queries (read a value or state)499
Settings and actions15265
Subsystems149
Distinct command headers18025
Headers the other lacks17116
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?Not in library
Models on this command setDG1022Z, DG1032ZSDG1032X

Commands both accept

9 command headers are in both libraries. Where the SDG1032X library writes the command differently, its form is shown under the DG1022Z's.

CommandWhat it does
*SAV <Location>SDG1032X: *SAV <Slot>Save State. Stores the current instrument state or arbitrary waveform to an internal location.
*RCL <Location>SDG1032X: *RCL <Slot>Recall State. Recalls a state or arbitrary waveform from an internal location.
*IDN?Identify. Returns the instrument identification string (manufacturer model serial firmware).
*RSTReset. Restores the instrument to its factory default state.
*CLSClear Status. Clears all event registers and the error queue.
*OPC?Operation Complete. Returns 1 when all pending operations are complete.
*WAIWait For Complete. Prevents further command execution until all pending operations complete.
*TRGTrigger. Triggers a sweep or burst when the trigger source is set to manual.
*OPT?Query Options. Returns whether the 16M arbitrary memory option is installed.

Only on the Rigol DG1022Z

171 command headers in the DG1022Z library have no match in the SDG1032X library. Below are 24 of them from the 6 largest subsystems; the full list is in the Rigol DG1022Z command reference.

SOURce (124 only on the DG1022Z)

CommandWhat it does
:SOURce1:APPLy:SINusoid <Freq>,<Amp>,<Offset>Apply Sine. Configures channel 1 to output a sine waveform with the given frequency amplitude and offset.
:SOURce1:APPLy:SQUare <Freq>,<Amp>,<Offset>Apply Square. Configures channel 1 to output a square waveform with the given frequency amplitude and offset.
:SOURce1:APPLy:RAMP <Freq>,<Amp>,<Offset>Apply Ramp. Configures channel 1 to output a ramp waveform with the given frequency amplitude and offset.
:SOURce1:APPLy:PULSe <Freq>,<Amp>,<Offset>Apply Pulse. Configures channel 1 to output a pulse waveform with the given frequency amplitude and offset.

OUTPut (14 only on the DG1022Z)

CommandWhat it does
:OUTPut1:STATe ONTurn On Output. Enables the output of channel 1.
:OUTPut1:STATe?Read Output State. Reads whether channel 1 output is ON or OFF.
:OUTPut1:IMPedance <Ohm>Set Output Impedance. Sets the output load impedance in ohms (1 to 10k) or INFinity for HighZ.
:OUTPut1:IMPedance?Read Output Impedance. Reads the current output load impedance setting.

COUNter (8 only on the DG1022Z)

CommandWhat it does
:COUNter:STATe ONEnable Counter. Enables the frequency counter function.
:COUNter:STATe?Read Counter State. Reads the running status of the frequency counter.
:COUNter:MEASure?Read Counter Measurement. Reads the frequency period duty cycle and pulse width measured by the counter.
:COUNter:COUPling <Mode>Set Counter Coupling. Sets the input coupling of the frequency counter.

DISPlay (6 only on the DG1022Z)

CommandWhat it does
:DISPlay:BRIGhtness <Level>Set Display Brightness. Sets the screen brightness level (1 to 100).
:DISPlay:BRIGhtness?Read Display Brightness. Reads the current screen brightness.
:DISPlay:MODE <Mode>Set Display Mode. Sets the display mode to dual parameter dual graph or single channel.
:DISPlay:TEXT <Str>Set Display Text. Displays a text string on the instrument screen.

IEEE 488.2 common (*) (5 only on the DG1022Z)

CommandWhat it does
*OPCSet Operation Complete Bit. Sets the operation complete bit after all previous commands are executed.
*ESE <Value>Set Event Status Enable. Sets the standard event status enable register.
*ESR?Read Event Status. Reads and clears the standard event status register.
*STB?Read Status Byte. Reads the status byte register without clearing it.

MMEMory (5 only on the DG1022Z)

CommandWhat it does
:MMEMory:STORe:STATe <File>Store State To File. Stores the current instrument state to a file on external memory.
:MMEMory:LOAD:STATe <File>Load State From File. Loads an instrument state file from external memory.
:MMEMory:CATalog?List Directory. Returns the files and folders in the current external memory directory.
:MMEMory:CDIRectory <Path>Set Directory. Sets the current working directory on external memory.

Only on the Siglent SDG1032X

16 command headers in the SDG1032X library have no match in the DG1022Z library. Below are 9 of them from the 6 largest subsystems; the full list is in the Siglent SDG1032X command reference.

C (11 only on the SDG1032X)

CommandWhat it does
C<Channel>:OUTP ONTurn 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.

BUZZ (1 only on the SDG1032X)

CommandWhat it does
BUZZ ONBuzzer On. Enables the buzzer.

COUP (1 only on the SDG1032X)

CommandWhat it does
COUP TRACE,ONEnable Channel Coupling. Enables channel tracking/coupling.

IEEE 488.2 common (*) (1 only on the SDG1032X)

CommandWhat it does
*TST?Self Test. Runs the self-test and returns 0 for pass.

ROSC (1 only on the SDG1032X)

CommandWhat it does
ROSC INTSet Clock Internal. Uses the internal reference clock.

SCSV (1 only on the SDG1032X)

CommandWhat it does
SCSV <Minutes>Screen Save On. Enables the screen saver.

Control both from Python

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: :OUTPut1:STATe ON on the DG1022Z and C1:OUTP ON on the SDG1032X. For the reading, the two libraries have no common command with a worked example on both, so each instrument uses its own: :OUTPut1:STATe? on the DG1022Z and *TST? on the SDG1032X. 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_DG1022Z_ADDRESS")  # Rigol DG1022Z
b = rm.open_resource("PASTE_SDG1032X_ADDRESS")  # Siglent SDG1032X
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(":OUTPut1:STATe ON")  # Turn On Output
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(":OUTPut1:STATe?"))  # Read Output State
print(b.query("*TST?"))  # Self Test

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rigol DG1022Z or Siglent SDG1032X and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Rigol DG1022Z and the Siglent SDG1032X for remote control?

In TestFlow's library the DG1022Z has 201 SCPI commands and the SDG1032X has 74 SCPI commands. 9 command headers are common to both, 171 are only on the DG1022Z (mostly SOURce and OUTPut), and 16 are only on the SDG1032X (mostly C and BUZZ).

Can I use the same SCPI code for the Rigol DG1022Z and the Siglent SDG1032X?

Partly. 9 command headers are accepted by both. 187 are not, for example :SOURce1:APPLy:SINusoid on the DG1022Z and C<Channel>:OUTP on the SDG1032X, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the DG1022Z or the SDG1032X?

The DG1022Z: 201 commands for the DG1022Z against 74 for the SDG1032X in TestFlow's library. Of those, 49 on the DG1022Z and 9 on the SDG1032X are queries that read a value or state, and the library splits them into 14 and 9 subsystems.

How do the DG1022Z and SDG1032X signal operation complete and report errors?

Both libraries synchronise with *OPC?. Only the DG1022Z 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.

Your next test, automated today

Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.