Connecting to HMP 2020 by Rohdes&Schwarz in Python
Instrument Card
The R&S HMP2020 two-channel power supply deliver up to 188 W total output power
Device Specification: here
Manufacturer card: ROHDES&SCHWARZ
Rohde & Schwarz GmbH & Co KG is an international electronics group specializing in the fields of electronic test equipment, broadcast & media, cybersecurity, radiomonitoring and radiolocation, and radiocommunication.
- Headquarters: Munich, Germany
- Yearly Revenue (millions, USD): 2500
- Vendor Website: here
Demo: Measure a solar panel IV curve with a Keithley 2400
Connect to the HMP 2020 in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
In this script, we first import the necessary modules: qcodes
and the HMP2020
driver from the rohde_schwarz
package.
Then, we create an instance of the HMP2020
driver, passing the instrument’s connection string as the second argument. The connection string specifies the communication protocol (TCPIP0), IP address (192.168.0.1), and instrument name (inst0).
We can then use the power_supply
object to interact with the power supply. In this example, we print the power supply’s identification (IDN) string, set the output voltage to 5V, enable the output, wait for 2 seconds using qc.sleep()
, and then disable the output.
Finally, we close the connection to the power supply using power_supply.close()
.