########################################################## ''' Initializing the devices ''' # TENMA setting rm = pyvisa.highlevel.ResourceManager( ) # Opens the resource manager and sets it to variable rm gate_dev = rm.open_resource("ASRL5::INSTR", baud_rate=9600, data_bits=8) gate_dev.write_termination = '\n' gate_dev.read_termination = '\n' gate_dev.send_end = True gate_dev.StopBits = 1 SetRemote(gate_dev) # initializing the ZND VNA = RS_ZND('TCPIP::192.168.10.151::INSTR', reset=False) # VNA.SetSweepfrequency(start_freq, stop_freq, freq_points) # VNA.SetPower(power) #[db] minimum -30db # VNA.SetIFBW(1e3) #Set IF bandwidth in Hz # VNA.SetSweepTime(SweepTime) # VNA.AutoScale() # # VNA.write('INST:SEL "NA"') #set mode to Network Analyzer # if measure == 'OnePort': # VNA.SinglePort() # elif measure == 'TwoPort': # VNA.TwoPort() # if averaging > 1: # VNA.write('SENS:AVER:COUN %d' % averaging) # # VNA.write('SENS:AVER ON')
''' Initializing the devices ''' # TENMA setting rm = pyvisa.highlevel.ResourceManager( ) # Opens the resource manager and sets it to variable rm gate_dev = rm.open_resource("ASRL8::INSTR", baud_rate=9600, data_bits=8) gate_dev.write_termination = '\n' gate_dev.read_termination = '\n' gate_dev.send_end = True gate_dev.StopBits = 1 print('here') print(gate_dev.query("*IDN?")) print('here') # initializing the ZND VNA = RS_ZND('TCPIP::192.168.10.151::INSTR', reset=False) # VNA.SetSweepfrequency(start_freq, stop_freq, freq_points) # VNA.SetPower(power) #[db] minimum -30db # VNA.SetIFBW(1e3) #Set IF bandwidth in Hz # VNA.SetSweepTime(SweepTime) # VNA.AutoScale() # # VNA.write('INST:SEL "NA"') #set mode to Network Analyzer # if measure == 'OnePort': # VNA.SinglePort() # elif measure == 'TwoPort': # VNA.TwoPort() # if averaging > 1: # VNA.write('SENS:AVER:COUN %d' % averaging) # # VNA.write('SENS:AVER ON')
pygame.display.set_mode((100,100)) STOP = False monitor_ratio = 5 #shows 1 out of "monitor_ratio" spectrums ########################################################## ''' Initializing the devices ''' # resetting the IVVI dev = IVVI_DAC('COM4') # IVVI dev.RampAllZero() # initializing the ZND ZND = RS_ZND('TCPIP::192.168.1.149::INSTR', reset=True) ZND.ClearAll() if measure == 'OnePort': ZND.SinglePort() elif measure == 'TwoPort': ZND.TwoPort() ZND.SetSweepfrequency(start_freq, stop_freq, freq_points) ZND.SetIFBW(1e3) #Set IF bandwidth in Hz ZND.SetSweepTime(SweepTime) ZND.AutoScale() # initializing the temperature reading tempdev = He7Temperature(addr='192.168.1.249',verb=False) temp = 0
'color': 'darkred', 'weight': 'normal', 'size': 16, } ########################################################## ''' Initializing the devices ''' # Keysight setting gate_dev = Keysight_B2901A('TCPIP::192.168.1.63::INSTR') gate_dev.SetModeVoltage() gate_dev.SetOutputOn() gate_dev.SetComplianceCurrent(safe_gate_current) # initializing the ZND ZND = RS_ZND('TCPIP::192.168.1.149::INSTR', reset=False) ############################################################# ''' measurements ''' # generating gate pattern pattern = gate_pattern(target_gate=target_gate, mode='single', data_points=gate_points, shift_voltage=shift_voltage) # modulating the gate voltage count = 0 # couter of step numbers leakage_current = 0 ramp_time = np.abs(np.floor(shift_voltage / ramp_spead)) gate_dev.RampVoltage(pattern['ramp_pattern'][0], tt=10 * ramp_time, steps=100)
measure_frequency = np.linspace(start_freq, stop_freq, freq_points) ########################################################## ''' Initializing the devices ''' # Keysight setting gate_dev = Keysight_B2901A('TCPIP::192.168.1.63::INSTR') gate_dev.SetModeVoltage() gate_dev.SetComplianceCurrent(safe_gate_current) gate_dev.SetOutputOn() #Triton mytriton = tritonclass() # initializing the ZND VNA = RS_ZND('TCPIP::192.168.1.149::INSTR', reset=False) VNA.SetStart(start_freq * 1e9) VNA.SetEnd(stop_freq * 1e9) VNA.SetPoints(freq_points) VNA.SetPower(power) #[db] minimum -30db VNA.SetIFBW(1e3) #Set IF bandwidth in Hz # VNA.SetSweepTime(SweepTime) VNA.AutoScale() # # VNA.write('INST:SEL "NA"') #set mode to Network Analyzer # if measure == 'OnePort': # VNA.SinglePort() # elif measure == 'TwoPort': # VNA.TwoPort()
'color': 'darkred', 'weight': 'normal', 'size': 16, } colnames = [ 'Frequency (Hz)', 'S21re ()', 'S21im ()', 'S21dB (dB)', 'S21Ph (rad)', 'Power (dBm)', 'Time (s)', 'Gate Voltage (V)', 'S21 (uW)' ] Data = stlab.newfile(prefix, '_', colnames, autoindex=True, mypath=path) ########################################################## ''' Initializing the devices ''' # initializing the ZND VNA = RS_ZND('TCPIP::192.168.10.151::INSTR', reset=False) VNA.SetSweepfrequency(start_freq, stop_freq, freq_points) VNA.SetIFBW(IF_bandwidth) #Set IF bandwidth in Hz ############################################################# ''' measurements ''' # amping to the target gate S_amp_Watt = np.array([], []) S_phase = np.array([], []) STOP = False t_in = time.time() count = 0
vmeasure = stlab.adi('TCPIP::192.168.1.105::INSTR',read_termination='\n') # with Keithley DMM6500 # vmeasure=stlab.adi("ASRL1::INSTR") #with Keithley 2000 vmeasure.write('SENS:VOLT:DC:RANG:AUTO 0') vmeasure.write('SENS:VOLT:DC:RANGE 2') vmeasure.write(':INIT:CONT 0') vmeasure.write('VOLT:NPLC 1') vmeasure.write('TRIG:SOUR IMM') vmeasure.write(":SYST:AZER:STAT OFF") vmeasure.write(":TRIG:COUN 1") gate_leakage_v_I_conversion = 1e-6 # conversion factor of the measured voltage on S1h 'Current monitor' to leakage current # initializing the ZND ZND = RS_ZND('TCPIP::192.168.1.149::INSTR', reset=True) ZND.TwoPort() ZND.SetSweepfrequency(start_freq, stop_freq, freq_points) ZND.SetPower(power) #[db] minimum -30db ZND.SetIFBW(1e3) #Set IF bandwidth in Hz ZND.SetSweepTime(SweepTime) ZND.AutoScale() # initializing the temperature reading tempdev = He7Temperature(addr='192.168.1.249',verb=False) temp = 0 ############################################################# ''' measurements '''