Function Generator · SCPI command comparison

Keithley 3390 vs Siglent SDG2042X: SCPI commands and remote control compared

In TestFlow's instrument library, the Keithley 3390 takes 88 SCPI commands, 10 of them queries, and the Siglent SDG2042X takes 77 SCPI commands, 9 of them queries. That is 11 more on the 3390. Counting distinct command headers (the command path without its arguments), 9 are accepted by both, 65 exist only on the 3390, and 17 only on the SDG2042X. 12% of the 3390's command headers also exist on the SDG2042X.

Only the 3390 has OUTPut, VOLTage, FREQuency, APPLy, BURSt, and FUNCtion and 9 more. Only the SDG2042X has C, COUP, ROSC, BUZZ, and SCSV.

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

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

3390 commands
88
SDG2042X commands
77
Shared headers
9
Unique headers
82

Run this on your bench

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

Get started

3390 vs SDG2042X 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.

Keithley 3390Siglent SDG2042X
Commands in TestFlow's library8877
Queries (read a value or state)109
Settings and actions7868
Subsystems199
Distinct command headers7426
Headers the other lacks6517
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?Not in library
Models on this command set3390SDG2042X, SDG6022X

Commands both accept

9 command headers are in both libraries.

CommandWhat it does
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).
*RSTReset. Resets the instrument to its default state.
*CLSClear 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.
*WAIWait To Continue. Waits until all pending operations are complete.
*TRGTrigger Bus. Generates a bus trigger.
*SAV <Slot>Save State Slot. Stores the current state to a memory slot (0 to 4).
*RCL <Slot>Recall State Slot. Recalls a state from a memory slot (0 to 4).

Only on the Keithley 3390

65 command headers in the 3390 library have no match in the SDG2042X library. Below are 24 of them from the 6 largest subsystems; the full list is in the Keithley 3390 command reference.

VOLTage (7 only on the 3390)

CommandWhat it does
VOLTage <Amp>Set Amplitude. Sets the output amplitude (Vpp).
VOLTage?Read Amplitude. Reads the output amplitude.
VOLTage:OFFSet <Volt>Set Voltage Offset. Sets the DC offset voltage.
VOLTage:OFFSet?Read Voltage Offset. Reads the DC offset voltage.

APPLy (6 only on the 3390)

CommandWhat it does
APPLy:SINusoid <Freq>,<Amp>,<Offset>Apply Sine. Sets sine with the given frequency, amplitude and offset.
APPLy:SQUare <Freq>,<Amp>,<Offset>Apply Square. Sets square with the given frequency, amplitude and offset.
APPLy:RAMP <Freq>,<Amp>,<Offset>Apply Ramp. Sets ramp with the given frequency, amplitude and offset.
APPLy:PULSe <Freq>,<Amp>,<Offset>Apply Pulse. Sets pulse with the given frequency, amplitude and offset.

FREQuency (6 only on the 3390)

CommandWhat it does
FREQuency <Freq>Set Frequency. Sets the output frequency in Hz.
FREQuency?Read Frequency. Reads the output frequency.
FREQuency:STARt <Freq>Set Sweep Start Freq. Sets the sweep start frequency.
FREQuency:STOP <Freq>Set Sweep Stop Freq. Sets the sweep stop frequency.

BURSt (5 only on the 3390)

CommandWhat it does
BURSt:STATe ONEnable Burst. Enables burst mode.
BURSt:MODE <Mode>Set Burst Mode. Sets the burst mode.
BURSt:NCYCles <N>Set Burst Cycles. Sets the number of cycles per burst.
BURSt:INTernal:PERiod <Sec>Set Burst Period. Sets the internal burst period.

FUNCtion (5 only on the 3390)

CommandWhat it does
FUNCtion <Shape>Set Function. Sets the output waveform shape.
FUNCtion?Read Function. Reads the output waveform shape.
FUNCtion:RAMP:SYMMetry <Pct>Set Ramp Symmetry. Sets the ramp symmetry percentage.
FUNCtion:SQUare:DCYCle <Pct>Set Square Duty Cycle. Sets the square-wave duty cycle percentage.

OUTPut (5 only on the 3390)

CommandWhat it does
OUTPut ONTurn On Output. Enables the output.
OUTPut?Read Output State. Reads whether the output is on.
OUTPut:LOAD <Ohm>Set Output Load. Sets the output load in ohms (1 to 10k); use INF for high-Z.
OUTPut:POLarity NORMalSet Output Polarity Normal. Sets output polarity to normal.

Only on the Siglent SDG2042X

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

C (12 only on the SDG2042X)

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 SDG2042X)

CommandWhat it does
BUZZ ONBuzzer On. Enables the buzzer.

COUP (1 only on the SDG2042X)

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

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

CommandWhat it does
*OPT?Read Options. Queries the installed options.

ROSC (1 only on the SDG2042X)

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

SCSV (1 only on the SDG2042X)

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: OUTPut ON on the 3390 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: OUTPut? on the 3390 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_3390_ADDRESS")  # Keithley 3390
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 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("OUTPut?"))  # 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 Keithley 3390 or Siglent SDG2042X and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Keithley 3390 and the Siglent SDG2042X for remote control?

In TestFlow's library the 3390 has 88 SCPI commands and the SDG2042X has 77 SCPI commands. 9 command headers are common to both, 65 are only on the 3390 (mostly VOLTage and APPLy), and 17 are only on the SDG2042X (mostly C and BUZZ).

Can I use the same SCPI code for the Keithley 3390 and the Siglent SDG2042X?

Partly. 9 command headers are accepted by both. 82 are not, for example VOLTage on the 3390 and C<Channel>:OUTP on the SDG2042X, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the 3390 or the SDG2042X?

The 3390: 88 commands for the 3390 against 77 for the SDG2042X in TestFlow's library. Of those, 10 on the 3390 and 9 on the SDG2042X are queries that read a value or state, and the library splits them into 19 and 9 subsystems.

How do the 3390 and SDG2042X signal operation complete and report errors?

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

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.