QCoDeS Example with R&S HMP4040 Power SupplyΒΆ

[1]:
import qcodes as qc
import qcodes_contrib_drivers.drivers.RohdeSchwarz.HMP4040 as hmp4040

Create the instrument (in this case a HMP4040 connected via USB to the ASRL4::INSTR address)

[2]:
ps = hmp4040.RohdeSchwarzHMP4040('ps_1', 'ASRL4::INSTR')
Connected to: ROHDE&SCHWARZ HMP4040 (serial:101920, firmware:HW50020003/SW2.62) in 0.12s

You can set voltage and/or current to any channel.

[3]:
ps.ch1.set_voltage.set(0.05)
ps.ch2.set_current.set(0.2)

The set voltage and current can be read out.

[4]:
print(ps.ch1.set_voltage.get())
print(ps.ch2.set_current.get())
0.05
0.2

Channel(s) should be turned on, as well as the master on/off

[5]:
ps.ch1.state('ON')
ps.state('ON')

Voltage, current and power can be measured

[6]:
print('V1=', ps.ch1.voltage.get())
print('I1=', ps.ch1.current.get())
print('P1=', ps.ch1.power.get())
V1= 0.05
I1= 0.005
P1= 0.00025

And finally turned off

[7]:
ps.ch1.state('OFF')
ps.state('OFF')