Power Supply · SCPI command comparison

Rohde & Schwarz HMC8043 vs HMP4040: SCPI commands and remote control compared

In TestFlow's instrument library, the Rohde & Schwarz HMC8043 takes 70 SCPI commands, 28 of them queries, and the Rohde & Schwarz HMP4040 takes 28 SCPI commands, 9 of them queries. That is 42 more on the HMC8043. Counting distinct command headers (the command path without its arguments), 10 are accepted by both, 53 exist only on the HMC8043, and 0 only on the HMP4040. 16% of the HMC8043's command headers also exist on the HMP4040.

Both libraries have commands under SYSTem and INSTrument. Only the HMC8043 has VOLTage, OUTPut, FUSE, CURRent, POWer, and MEASure and 2 more.

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

HMC8043 commands
70
HMP4040 commands
28
Shared headers
10
Unique headers
53

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz HMC8043 or Rohde & Schwarz HMP4040 and writes the report from the measured results.

Get started

HMC8043 vs HMP4040 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.

Rohde & Schwarz HMC8043Rohde & Schwarz HMP4040
Commands in TestFlow's library7028
Queries (read a value or state)289
Settings and actions4219
Subsystems116
Distinct command headers6310
Headers the other lacks530
Command languageSCPISCPI
Operation complete*OPC?*OPC?
Error queueSYSTem:ERRor?SYSTem:ERRor?
Models on this command setHMC8043HMP4040

Commands both accept

10 command headers are in both libraries. Where the HMP4040 library writes the command differently, its form is shown under the HMC8043's.

CommandWhat it does
SYSTem:ERRor?Read Error. Read and remove the oldest error, e.g. 0,"No error" or -102,"Syntax error" (manual p.23).
INSTrument:NSELect <Channel>HMP4040: INSTrument:NSELect 1 ; ...Select Channel Number. Select a channel by its number, as Select_Channel does (manual p.25).
*IDN?Identify. Return maker, model, serial number and firmware version (manual p.20).
*RSTReset. Reset the instrument to its defaults; every output turns off (manual p.20).
*CLSClear Status. Clear the status registers and the error queue (manual p.19).
*OPC?Operation Complete. Return 1 once every previous command has finished (manual p.20).
*WAIWait. Hold further commands until every previous one has been executed (manual p.21).
*TST?Self Test. Run the self-test and return its result, 0 when it passed (manual p.21).
*SAV <Slot>Save State. Store the instrument settings in a memory location, overwriting it (manual p.54).
*RCL <Slot>Recall State. Recall the settings stored in a memory location (manual p.54).

Only on the Rohde & Schwarz HMC8043

53 command headers in the HMC8043 library have no match in the HMP4040 library. Below are 24 of them from the 6 largest subsystems; the full list is in the Rohde & Schwarz HMC8043 command reference.

VOLTage (11 only on the HMC8043)

CommandWhat it does
VOLTage <Voltage>Set Voltage. Voltage setpoint of the selected channel (manual p.26).
VOLTage?Read Voltage Setpoint. Return the selected channel's voltage setpoint in V (manual p.26).
VOLTage:STEP <Step>Set Voltage Step. Step size of Voltage_Up and Voltage_Down (manual p.27).
VOLTage:PROTection <State>Set OVP. Turn the selected channel's over-voltage protection on or off (manual p.34).

FUSE (8 only on the HMC8043)

CommandWhat it does
FUSE <State>Set Fuse. Turn the selected channel's electronic fuse on or off (manual p.32).
FUSE?Read Fuse. Return 1 when the selected channel's fuse is on, else 0 (manual p.32).
FUSE:DELay <Delay>Set Fuse Delay. Delay before the selected channel's fuse trips (manual p.32).
FUSE:DELay?Read Fuse Delay. Return the selected channel's fuse delay in s (manual p.33).

MEASure (6 only on the HMC8043)

CommandWhat it does
MEASure:VOLTage?Measure Voltage. Return the voltage measured at the selected channel's output in V (manual p.38).
MEASure:CURRent?Measure Current. Return the current measured at the selected channel's output in A (manual p.38).
MEASure:POWer?Measure Power. Return the power measured at the selected channel's output in W (manual p.38).
MEASure:ENERgy:STATe <State>Set Energy Meter. Turn the selected channel's energy meter on or off (manual p.38).

OUTPut (6 only on the HMC8043)

CommandWhat it does
OUTPut ONOutput On. Turn the selected channel's output on together with the master output (manual p.30).
OUTPut?Read Output. Return 1 when the selected channel's output is on, else 0 (manual p.30).
OUTPut:CHANnel ONChannel Output On. Arm the selected channel; it outputs once the master output is on (manual p.30).
OUTPut:CHANnel?Read Channel Output. Return 1 when the selected channel is armed, else 0 (manual p.31).

POWer (6 only on the HMC8043)

CommandWhat it does
POWer:PROTection <State>Set OPP. Turn the selected channel's over-power protection on or off (manual p.36).
POWer:PROTection?Read OPP. Return 1 when the selected channel's OPP is on, else 0 (manual p.37).
POWer:PROTection:LEVel <Power>Set OPP Level. Over-power protection level of the selected channel (manual p.37).
POWer:PROTection:LEVel?Read OPP Level. Return the selected channel's OPP level in W (manual p.37).

SYSTem (6 only on the HMC8043)

CommandWhat it does
SYSTem:VERSion?Read Version. Return the firmware version and the SCPI version (manual p.23).
SYSTem:REMoteRemote. Switch to remote control (manual p.23).
SYSTem:LOCalLocal. Return to front-panel control; also the only way to unlock after Remote_Lock (manual p.23).
SYSTem:RWLockRemote Lock. Remote control with the front panel locked until Local is sent (manual p.23).

Only on the Rohde & Schwarz HMP4040

Every command header in TestFlow's HMP4040 library also exists in the HMC8043 library. The HMC8043 is the superset here.

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: VOLTage UP on the HMC8043. For the reading, both libraries hold SYSTem:ERRor? (read error), 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_HMC8043_ADDRESS")  # Rohde & Schwarz HMC8043
b = rm.open_resource("PASTE_HMP4040_ADDRESS")  # Rohde & Schwarz HMP4040
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("VOLTage UP")  # Voltage Up

# The same reading on both: Read Error
print(a.query("SYSTem:ERRor?"))
print(b.query("SYSTem:ERRor?"))

a.close()
b.close()

Run this on your bench

Describe the test; TestFlow's agent uses these command sets to drive your Rohde & Schwarz HMC8043 or Rohde & Schwarz HMP4040 and writes the report from the measured results.

Get started

Frequently asked questions

What is the difference between the Rohde & Schwarz HMC8043 and the Rohde & Schwarz HMP4040 for remote control?

In TestFlow's library the HMC8043 has 70 SCPI commands and the HMP4040 has 28 SCPI commands. 10 command headers are common to both, 53 are only on the HMC8043 (mostly VOLTage and FUSE), and 0 are only on the HMP4040.

Can I use the same SCPI code for the Rohde & Schwarz HMC8043 and the Rohde & Schwarz HMP4040?

Partly. 10 command headers are accepted by both, including SYSTem:ERRor? and INSTrument:NSELect. 53 are not, so a script that uses those needs a separate branch for each instrument.

Which has more remote commands, the HMC8043 or the HMP4040?

The HMC8043: 70 commands for the HMC8043 against 28 for the HMP4040 in TestFlow's library. Of those, 28 on the HMC8043 and 9 on the HMP4040 are queries that read a value or state, and the library splits them into 11 and 6 subsystems.

How do the HMC8043 and HMP4040 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.