Skip to content
Snippets Groups Projects
Commit b295a696 authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

Voltmeter part 1

parent e04f020f
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ def OL(device):
return df
#double sweep from start to stop and then from start to stop
def sweep(start,stop,step,comp,integration,device): #step cannot be negative
def sweep(start,stop,step,comp,integration,voltmeter,device):
device.del_user_functions()
if start < stop and step < 0 :
step = -step
......@@ -168,13 +168,47 @@ def sweep(start,stop,step,comp,integration,device): #step cannot be negative
pcomp = 0
)
# Setup the voltmeter configurations
smu_voltmeter_1 = device.smu_dict()
smu_voltmeter_3 = device.smu_dict()
smu_voltmeter_1.update(
iname = 'I1',
vname = 'V1',
mode = 'I',
func = 'CONS',
value = 0
comp = 'MAX',
)
smu_voltmeter_3.update(
iname = 'I3',
vname = 'V3',
mode = 'I',
func = 'CONS',
value = 0
comp = 'MAX',
)
#disable smus 1 and 3
device.measurement_mode('SWE')
if voltmeter == False:
device.smu_disable(1)
device.smu_disable(3)
else:
device.setup_smu(1,smu_voltmeter_1)
device.setup_smu(3,smu_voltmeter_3)
device.setup_smu(2,smu_v)
device.setup_smu(4,smu_ground)
# Do it as the tool would do it
if volmeter == True:
device.user_function("VMEAS","V","V3-V1")
device.setup_cons_smu(1,smu_voltmeter_1)
device.setup_cons_smu(3,smu_voltmeter_3)
device.setup_var1(parameters)
device.integration_time(integration)
......@@ -374,7 +408,6 @@ def plot_retention(x,y):
ax.plot(x,y)
display(fig)
def create_data_frame(x,y):
header = ['V(V)','ABSV(V)',"I(A)",'ABSI(A)',"R(Ohm)"]
data = {header[0]:x,header[1]:np.absolute(x),header[2]:y,header[3]:np.absolute(y),header[4]:np.divide(x,y)}
......
......@@ -77,6 +77,12 @@ auto_qcc = widgets.Checkbox(
style = {'description_width': 'initial'},
value = True
)
# Voltmeter for set reset endurance
voltmeter = widgets.Checkbox(
description = "Voltmeter",
style = {'description_width': 'initial'},
value = False
)
# THE BUTTONS
#create buttons as it shown in the how_buttons_look
......@@ -164,7 +170,7 @@ threshold = widgets.FloatText(
)
#align a button with a checkbox or integer bounded texts horizontaly
line0 = widgets.HBox([step,integration_time,sampling,auto_qcc])
line0 = widgets.HBox([step,integration_time,sampling,voltmeter,auto_qcc])
line1 = widgets.HBox([set,Vset,CC_vset])
line2 = widgets.HBox([reset,Vreset,CC_vreset])
line3 = widgets.HBox([full,number,auto_stop,threshold])
......@@ -196,7 +202,7 @@ display(tab)
display(widgets.HBox([import_ini_button,export_ini_button]))
display(output)
all_widgets=[sweep_button,cons_button,sample_series,field,DUT,set,reset,full,new_folder,retention_button,contact_check,qcc,qcc_select,Vset,CC_vset,Vreset,CC_vreset,step,integration_time,number,sampling,Vretention,period,duration,auto_qcc,auto_stop,threshold,export_ini_button,import_ini_button]
all_widgets=[sweep_button,cons_button,sample_series,field,DUT,set,reset,full,new_folder,retention_button,contact_check,qcc,qcc_select,Vset,CC_vset,Vreset,CC_vreset,step,integration_time,number,sampling,Vretention,period,duration,auto_qcc,auto_stop,threshold,export_ini_button,import_ini_button,voltmeter]
add_widgets_to_list(cons_dict,all_widgets)
add_widgets_to_list(sweep_dict,all_widgets)
......@@ -298,9 +304,11 @@ def on_set_button_clicked(b):
#execute measurement,plot results and save them
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,device)
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,voltmeter.value,device)
plot_sweep(V12,I12,'SET')
df = create_data_frame(V12,I12)
if voltmeter.value == True:
df["V3-V1 (V)"] = np.array(device.return_data("VMEAS"))
display(df)
......@@ -346,9 +354,11 @@ def on_reset_button_clicked(b):
R_mean_before = sampling_check(0.01,device)
#execute measurement,plot results and save them
V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,device)
V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,voltmeter.value,device)
plot_sweep(V34,I34,'RESET')
df = create_data_frame(V34,I34)
if voltmeter.value == True:
df["V3-V1 (V)"] = np.array(device.return_data("VMEAS"))
display(df)
if sampling.value == True: #do sampling set after reset process(100mV)
......@@ -428,7 +438,9 @@ def on_full_button_clicked(b):
R_mean_init = sampling_check(-0.01,device)
resistances.append(R_mean_init)
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,device) #set
V12,I12 = sweep(0,Vset.value,step.value,CC_vset.value,integration_time.value,voltmeter.value,device) #set
if voltmeter.value == True:
V12_meas = np.array(device.return_data("VMEAS"))
plot_sweep(V12,I12,f"SET Iteration {i+1}")
#after set/before reset
......
%% Cell type:code id:b913930d-b120-4e59-8a42-d9eecb526a61 tags:
``` python
%run memristor.py
```
%% Output
%% Cell type:code id:cf97050b-5c05-4e11-a706-60a4d48c3d0d tags:
%% Cell type:code id:a917fee4-b51f-4eb3-8ab9-dabee429d75f tags:
``` python
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment