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?.
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.
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 HMC8043 | Rohde & Schwarz HMP4040 | |
|---|---|---|
| Commands in TestFlow's library | 70 | 28 |
| Queries (read a value or state) | 28 | 9 |
| Settings and actions | 42 | 19 |
| Subsystems | 11 | 6 |
| Distinct command headers | 63 | 10 |
| Headers the other lacks | 53 | 0 |
| Command language | SCPI | SCPI |
| Operation complete | *OPC? | *OPC? |
| Error queue | SYSTem:ERRor? | SYSTem:ERRor? |
| Models on this command set | HMC8043 | HMP4040 |
10 command headers are in both libraries. Where the HMP4040 library writes the command differently, its form is shown under the HMC8043's.
| Command | What 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). |
| *RST | Reset. Reset the instrument to its defaults; every output turns off (manual p.20). |
| *CLS | Clear 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). |
| *WAI | Wait. 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). |
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.
| Command | What 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). |
| Command | What 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). |
| Command | What 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). |
| Command | What it does |
|---|---|
| OUTPut ON | Output 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 ON | Channel 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). |
| Command | What 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). |
| Command | What it does |
|---|---|
| SYSTem:VERSion? | Read Version. Return the firmware version and the SCPI version (manual p.23). |
| SYSTem:REMote | Remote. Switch to remote control (manual p.23). |
| SYSTem:LOCal | Local. Return to front-panel control; also the only way to unlock after Remote_Lock (manual p.23). |
| SYSTem:RWLock | Remote Lock. Remote control with the front panel locked until Local is sent (manual p.23). |
Every command header in TestFlow's HMP4040 library also exists in the HMC8043 library. The HMC8043 is the superset here.
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()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.
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.
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.
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.
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.
Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.