QDAC-II constant voltageΒΆ
[1]:
from time import sleep
from IPython.display import Image, display
from qcodes_contrib_drivers.drivers.QDevil import QDAC2
qdac_addr = '192.168.8.17'
qdac = QDAC2.QDac2('QDAC', visalib='@py', address=f'TCPIP::{qdac_addr}::5025::SOCKET')
from qcodes.instrument_drivers.rigol import RigolDS1074Z
rigol_addr = '192.168.8.199'
scope = RigolDS1074Z('rigol', visalib='@py', address=f'TCPIP::{rigol_addr}::INSTR')
Connected to: QDevil QDAC-II (serial:3, firmware:10-1.4) in 0.21s
Connected to: RIGOL TECHNOLOGIES DS1104Z (serial:DS1ZA171812151, firmware:00.04.03) in 0.04s
[10]:
scope.write('*rst')
qdac.reset()
[11]:
def capture():
scope.write('stop')
scope.write(":disp:data?")
bmpdata = scope.visa_handle.read_raw()[2+9:]
image = Image(data=bmpdata)
display(image)
[12]:
# Connect scope ch 3 to qdac ch 3
scope.write('chan1:disp off')
scope.write('chan3:disp on')
scope.write('chan3:bwl on')
scope.write('chan3:prob 1')
scope.write('chan3:scal 2.0')
scope.write('chan3:offs -4.0')
scope.write('trig:edge:sour chan3')
scope.write('trig:edge:level 0.25')
[13]:
qdac.ch03.output_mode(range='low')
scope.write('run')
qdac.ch03.dc_constant_V(2)
qdac.errors()
[13]:
'0, "No error"'
[6]:
capture()
[14]:
gate = qdac.channel(3)
gate.output_mode(range='high')
scope.write('run')
gate.dc_constant_V(10.0)
qdac.errors()
[14]:
'0, "No error"'
[8]:
capture()
[15]:
scope.write('chan3:scal 2.0')
scope.write('chan3:offs -4.0')
scope.write('trig:edge:sour chan3')
scope.write('trig:edge:level 5')
scope.write('trig:edge:slope neg')
scope.write('tim:scal 5e-2')
[16]:
qdac.ch03.output_mode(range='high', filter='dc')
qdac.ch03.dc_constant_V(10.0)
scope.write('sing')
sleep(3)
qdac.ch03.dc_constant_V(0.0)
qdac.errors()
[16]:
'0, "No error"'
[11]:
capture()