Oscilloscope · SCPI command comparison

Keysight DSOX1204G vs Rigol DHO804: SCPI commands and remote control compared

In TestFlow's instrument library, the Keysight DSOX1204G takes 169 SCPI commands, 65 of them queries, and the Rigol DHO804 takes 150 SCPI commands, 50 of them queries. That is 19 more on the DSOX1204G. Counting distinct command headers (the command path without its arguments), 54 are accepted by both, 96 exist only on the DSOX1204G, and 65 only on the DHO804. 36% of the DSOX1204G's command headers also exist on the DHO804.

Both libraries have commands under MEASure, CHANnel, TRIGger, WAVeform, TIMebase, ACQuire, DISPlay, and SYSTem, plus 5 more roots. Only the DSOX1204G has WGEN, FUNCtion, DVM, DIGitize, TER, and AER. Only the DHO804 has CURSor, MATH, TFORce, and CLEar.

Both libraries synchronise with *OPC?. Both libraries read errors with SYSTem:ERRor?.

TestFlow's library gives the EDUX1052G the same command set as the DSOX1204G, so the DSOX1204G column applies to it too. TestFlow's library gives the DHO814 the same command set as the DHO804, so the DHO804 column applies to it too.

DSOX1204G commands
169
DHO804 commands
150
Shared headers
54
Unique headers
161

Run this on your bench

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

Get started

DSOX1204G vs DHO804 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.

Keysight DSOX1204GRigol DHO804
Commands in TestFlow's library169150
Queries (read a value or state)6550
Settings and actions104100
Subsystems2220
Distinct command headers150119
Headers the other lacks9665
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setDSOX1204G, EDUX1052GDHO804, DHO814

Commands both accept

54 command headers are in both libraries. Here are 12, taken across subsystems. Where the DHO804 library writes the command differently, its form is shown under the DSOX1204G's.

CommandWhat it does
:MEASure:SOURce <Source>Measure Source. Selects the source used by subsequent measurement commands.
:CHANnel<Channel>:DISPlay ONChannel On. Turns on the display of the specified analog channel.
:TRIGger:MODE <Mode>DHO804: :TRIGger:MODE <Type>Trigger Mode. Selects the trigger type used by the oscilloscope.
:WAVeform:SOURce <Source>Waveform Source. Selects the source of the waveform data read back over the bus.
:TIMebase:MODE <Mode>Timebase Mode. Sets the horizontal timebase mode (main, zoomed window, XY or roll).
:ACQuire:TYPE <Type>Acquire Type. Selects the acquisition type used to build each waveform record.
:DISPlay:CLEarClear Display. Clears the display and resets all associated measurements.
:SYSTem:ERRor?Get Error. Reads and clears the next entry in the error queue.
[PNG:DISPlay:DATA? PNG,COLor]DHO804: [PNG:DISPlay:DATA? PNG]Capture. Reads a colour PNG screenshot of the current display back to the controller.
:AUToscaleDHO804: :AUTosetAuto Scale. Evaluates all input signals and sets the correct vertical, horizontal and trigger settings to display the signals.
:RUNRun. Starts repetitive acquisitions (same as pressing the Run key on the front panel).
:STOPStop. Stops the acquisition system and freezes the last acquired waveform on screen.

Only on the Keysight DSOX1204G

96 command headers in the DSOX1204G library have no match in the DHO804 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Keysight DSOX1204G command reference.

MEASure (26 only on the DSOX1204G)

CommandWhat it does
:MEASure:SOURce?Get Measure Source. Queries the source currently selected for measurements.
:MEASure:WINDow <Window>Measure Window. Selects whether measurements are made in the main window, the zoomed window or gated by markers.
:MEASure:VPP? <Source>Measure Vpp. Measures the peak-to-peak voltage of the selected source.
:MEASure:VMAX? <Source>Measure Vmax. Measures the maximum voltage of the selected source.

WGEN (12 only on the DSOX1204G)

CommandWhat it does
:WGEN:FUNCtion <Function>Wgen Function. Selects the waveform shape produced by the built-in waveform generator.
:WGEN:FREQuency <Frequency>Wgen Frequency. Sets the waveform generator output frequency in hertz.
:WGEN:VOLTage <Amplitude>Wgen Amplitude. Sets the waveform generator output amplitude in volts peak-to-peak.
:WGEN:VOLTage:OFFSet <Offset>Wgen Offset. Sets the waveform generator DC offset voltage.

TIMebase (10 only on the DSOX1204G)

CommandWhat it does
:TIMebase:SCALe <Scale>Timebase Scale. Sets the main timebase in seconds per division.
:TIMebase:SCALe?Get Timebase Scale. Queries the main timebase in seconds per division.
:TIMebase:RANGe <Range>Timebase Range. Sets the full-scale horizontal time in seconds for 10 divisions.
:TIMebase:POSition <Position>Timebase Position. Sets the time in seconds between the trigger event and the display reference point.

FUNCtion (8 only on the DSOX1204G)

CommandWhat it does
:FUNCtion:DISPlay ONMath Display On. Turns on the display of the specified math function waveform.
:FUNCtion:OPERation <Operation>Math Operation. Selects the operation performed by the math function.
:FUNCtion:SOURce1 <Source>Math Source 1. Selects the first input source for the math function.
:FUNCtion:SCALe <Scale>Math Scale. Sets the vertical scale of the math function waveform in units per division.

TRIGger (8 only on the DSOX1204G)

CommandWhat it does
:TRIGger:FORCeForce Trigger. Forces an immediate trigger event regardless of whether the trigger condition is met.
:TRIGger:SWEep?Get Trigger Sweep. Queries the current trigger sweep mode.
:TRIGger:EDGE:SOURce?Get Trigger Source. Queries the current edge trigger source.
:TRIGger:EDGE:SLOPe?Get Trigger Slope. Queries the current edge trigger slope.

ACQuire (7 only on the DSOX1204G)

CommandWhat it does
:ACQuire:COUNt <Count>Acquire Count. Sets the number of acquisitions averaged per time bucket in AVERage acquisition type (2 to 65536).
:ACQuire:COUNt?Get Acquire Count. Queries the averaging count currently selected.
:ACQuire:MODE <Mode>Acquire Mode. Sets the acquisition mode to real time or segmented memory.
:ACQuire:MODE?Get Acquire Mode. Queries the acquisition mode of the oscilloscope.

Only on the Rigol DHO804

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

MEASure (16 only on the DHO804)

CommandWhat it does
:MEASure:ITEM <Item>,<Source>Measure Item. Adds an automatic measurement of the selected parameter on the selected source.
:MEASure:ITEM? <Item>,<Source>Get Measure Item. Queries the measurement result of the selected parameter on the selected source.
:MEASure:AMSource <Source>Measure All Source. Sets the source of the all-parameter measurement function.
:MEASure:STATistic:DISPlay ONStatistics On. Turns on the statistic function for the automatic measurements.

CURSor (9 only on the DHO804)

CommandWhat it does
:CURSor:MODE <Mode>Cursor Mode. Enables cursor measurement in the selected mode.
:CURSor:MANual:SOURce <Source>Cursor Source. Sets the channel the manual cursors measure.
:CURSor:MANual:TYPE <Type>Cursor Type. Sets the manual cursor type (X for time, Y for amplitude).
:CURSor:MANual:CAX <Position>Cursor AX. Sets the horizontal position of cursor A in screen pixels.

TIMebase (9 only on the DHO804)

CommandWhat it does
:TIMebase:MAIN:SCALe <Scale>Timebase Scale. Sets the main timebase scale in s/div.
:TIMebase:MAIN:SCALe?Get Timebase Scale. Queries the main timebase scale in s/div.
:TIMebase:MAIN:OFFSet <Offset>Timebase Offset. Sets the main timebase (horizontal) offset in seconds relative to the trigger point.
:TIMebase:MAIN:OFFSet?Get Timebase Offset. Queries the main timebase (horizontal) offset in seconds.

TRIGger (9 only on the DHO804)

CommandWhat it does
:TRIGger:COUPling <Coupling>Trigger Coupling. Sets the trigger coupling type (edge trigger with an analog source only).
:TRIGger:STATus?Get Trigger Status. Queries the current trigger status (TD, WAIT, RUN, AUTO or STOP).
:TRIGger:POSition?Get Trigger Position. Queries the memory position that corresponds to the waveform trigger position.
:TRIGger:PULSe:SOURce <Source>Trigger Pulse Source. Sets the trigger source used by the pulse width trigger.

DISPlay (5 only on the DHO804)

CommandWhat it does
:DISPlay:TYPE <Type>Display Type. Sets the waveform display mode to vectors or dots.
:DISPlay:GRADing:TIME <Time>Persistence Time. Sets the waveform persistence time in seconds (MIN or INFinite also accepted).
:DISPlay:GRID <Grid>Display Grid. Sets the screen grid type.
:DISPlay:WBRightness <Percent>Waveform Brightness. Sets the waveform display brightness from 0 to 100 percent.

MATH (5 only on the DHO804)

CommandWhat it does
:MATH<Math>:DISPlay ONMath On. Turns on the math operation display.
:MATH<Math>:OPERator <Operator>Math Operator. Sets the operator of the math operation.
:MATH<Math>:SOURce1 <Source>Math Source 1. Sets source A of the math operation.
:MATH<Math>:SCALe <Scale>Math Scale. Sets the vertical scale of the math operation result.

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, both libraries hold :AUToscale (auto scale); the DHO804 library writes it as :AUToset. For the reading, both libraries hold :CHANnel<Channel>:DISPlay? (get channel state), 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_DSOX1204G_ADDRESS")  # Keysight DSOX1204G
b = rm.open_resource("PASTE_DHO804_ADDRESS")  # Rigol DHO804
for inst in (a, b):
    inst.timeout = 5000  # ms
    print(inst.query("*IDN?"))

# The same setting on both: Auto Scale
a.write(":AUToscale")
b.write(":AUToset")

# The same reading on both: Get Channel State
print(a.query(":CHANnel1:DISPlay?"))
print(b.query(":CHANnel1:DISPlay?"))

a.close()
b.close()

Run this on your bench

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

Get started

Frequently asked questions

What is the difference between the Keysight DSOX1204G and the Rigol DHO804 for remote control?

In TestFlow's library the DSOX1204G has 169 SCPI commands and the DHO804 has 150 SCPI commands. 54 command headers are common to both, 96 are only on the DSOX1204G (mostly MEASure and WGEN), and 65 are only on the DHO804 (mostly MEASure and CURSor).

Can I use the same SCPI code for the Keysight DSOX1204G and the Rigol DHO804?

Partly. 54 command headers are accepted by both, including :MEASure:SOURce, :CHANnel<Channel>:DISPlay, and :TRIGger:MODE. 161 are not, for example :MEASure:SOURce? on the DSOX1204G and :MEASure:ITEM on the DHO804, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the DSOX1204G or the DHO804?

The DSOX1204G: 169 commands for the DSOX1204G against 150 for the DHO804 in TestFlow's library. Of those, 65 on the DSOX1204G and 50 on the DHO804 are queries that read a value or state, and the library splits them into 22 and 20 subsystems.

How do the DSOX1204G and DHO804 signal operation complete and report errors?

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.

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.