import qcodes as qc
import qcodes.instrument_drivers.rohde_schwarz.HMC8043 as hmc8043
Create the instrument (in this case a HMC8043 connected with ethernet to the 10.0.1.1 address)
ps = hmc8043.RohdeSchwarzHMC8043('ps-1', 'TCPIP0::10.0.1.1::inst0::INSTR')
Connected to: Rohde&Schwarz HMC8043 (serial:026373828, firmware:HW42000000,SW01.303) in 0.44s
You can set voltage and/or current to any channel
ps.ch1.set_voltage(1)
ps.ch1.set_current(0.2)
ps.ch2.set_voltage(10)
Channel(s) should be turned on, as well as the master on/off
ps.ch1.state('ON')
ps.state('ON')
Voltage, current and power can be measured
print('V1=', ps.ch1.voltage())
print('I1=', ps.ch1.current())
print('P1=', ps.ch1.power())
V1= 1.0 I1= 0.0 P1= 0.0
And finally turned off
ps.ch1.state('OFF')
ps.state('OFF')