I'm trying to run transistor IV measurement, especially Vg sweep. I've been successful in programming other equipments such as Agilent 4156c, Keithley 2400 sourcemeter, etc, so now I'm trying to program Agilent B1500A.

I connected my laptop with B1500A using GPIB-USB-HS, and I installed all drivers needed. I confirmed that B1500 responsed IDN command using NI-VISA Test Panel.

Moreover, I found this website that could help me program B1500A with python in my laptop.

https://pymeasure.readthedocs.io/en/latest/api/instruments/agilent/agilentB1500.html#pymeasure.instruments.agilent.agilentB1500.AgilentB1500.meas_mode

According to this website, I used the code as below and finally I tried to run this, and the error 'VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.' occured in ''# set data output format (required!)

b1500.data_format(21, mode=1) #call after SMUs are initialized to get names for the channels''.

However, even without the line above,

''# choose measurement mode

b1500.meas_mode('STAIRCASE_SWEEP', *b1500.smu_references) #order in smu_references determines order of measurement'' also results the same error.

This error might caused by the former line, and does anybody know the solutions for this?

I'd really appreciate it if anybody could help me.

Thank you.

-----------------------------------------------------------------------------------------------

import pyvisa

import matplotlib.pyplot as plt

from pymeasure.instruments.agilent import AgilentB1500

# Define your instrument's VISA resource string

instrument_visa_address = "GPIB0::17::INSTR"

# Initialize PyVISA resource manager

rm = pyvisa.ResourceManager()

# Open a connection to the instrument

try:

instrument = rm.open_resource(instrument_visa_address, timeout=100000)

print(f"Connected to instrument: {instrument.query('*IDN?')}")

except pyvisa.VisaIOError as e:

print(f"Failed to connect to instrument: {e}")

exit()

# Initialize Agilent B1500A instrument

b1500 = AgilentB1500(instrument)

# explicitly define r/w terminations; set sufficiently large timeout in milliseconds or None.

b1500=AgilentB1500(instrument_visa_address)

# query SMU config from instrument and initialize all SMU instances

b1500.initialize_all_smus()

# set data output format (required!)

b1500.data_format(21, mode=1) #call after SMUs are initialized to get names for the channels

# choose measurement mode

b1500.meas_mode('STAIRCASE_SWEEP', *b1500.smu_references) #order in smu_references determines order of measurement

# settings for individual SMUs

for smu in b1500.smu_references:

smu.enable() #enable SMU

smu.adc_type = 'HRADC' #set ADC to high-resoultion ADC

smu.meas_range_current = '10uA'

smu.meas_op_mode = 'COMPLIANCE_SIDE' # other choices: Current, Voltage, FORCE_SIDE, COMPLIANCE_AND_FORCE_SIDE

# General Instrument Settings

# b1500.adc_averaging = 1

# b1500.adc_auto_zero = True

b1500.adc_setup('HRADC','AUTO',6)

#b1500.adc_setup('HRADC','PLC',1)

#Sweep Settings

b1500.sweep_timing(0,5,step_delay=0.1) #hold,delay

b1500.sweep_auto_abort(False,post='STOP') #disable auto abort, set post measurement output condition to stop value of sweep

# Sweep Source

nop = 11

Vg_start = -0.5

Vg_stop = 2.0

Vg_steps = 20

Vds_values = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0]

Vg_values = []

Ids_values = []

for Vg in np.linspace(Vg_start, Vg_stop, Vg_steps):

b1500.smu3.ramp_source('VOLTAGE','Auto Ranging',Vg, stepsize=0.1, pause=20e-3)

#type, mode, range, start, stop, steps, compliance

for Vds in Vds_values:

b1500.smu4.ramp_source('VOLTAGE','Auto Ranging',Vds, stepsize=0.1, pause=20e-3) #type, mode, range, start, stop, steps, compliance

#Start Measurement

b1500.check_errors()

b1500.clear_buffer()

b1500.clear_timer()

b1500.send_trigger()

# read measurement data all at once

b1500.check_idle() #wait until measurement is finished

data = b1500.read_data(2*nop) #Factor 2 because of double sweep

# Append gate voltage and drain current values to lists

Vg_values.append(Vg)

Ids_values.append(data[0][3])

# Plot Vg-Ids graph

plt.figure(figsize=(8, 6))

plt.plot(Vg_values, Ids_values, marker='o', linestyle='-')

plt.xlabel('Gate Voltage (V)')

plt.ylabel('Drain Current (A)')

plt.title('Vg-Ids Characteristics')

plt.grid(True)

plt.show()

'''

#alternatively: read measurement data live

meas = []

for i in range(nop*2):

read_data = b1500.read_channels(4+1) # 4 measurement channels, 1 sweep source (returned due to mode=1 of data_format)

# process live data for plotting etc.

# data format for every channel (status code, channel name e.g. 'SMU1', data name e.g 'Current Measurement (A)', value)

meas.append(read_data)

'''

#sweep constant sources back to 0V

b1500.smu3.ramp_source('VOLTAGE','Auto Ranging',0,stepsize=0.1,pause=20e-3)

b1500.smu4.ramp_source('VOLTAGE','Auto Ranging',0,stepsize=0.1,pause=20e-3)

-----------------------------------------------------------------------------------------------

More Junyoung Choi's questions See All
Similar questions and discussions