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

More Stress Functionallities!

parent b5cef3ec
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ def page_1(): ...@@ -38,7 +38,7 @@ def page_1():
#Fifth column function #Fifth column function
options_function= ['VAR1','VAR2','VARD','CONS'] options_function= ['VAR1','VAR2','VARD','CONS','SYNC','NSYNC']
first_page[0,4]= widgets.Label('FUNC',layout=Layout(height='auto', width='auto')) first_page[0,4]= widgets.Label('FUNC',layout=Layout(height='auto', width='auto'))
first_page[1,4]= widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options_function,value ='CONS') #smu1 first_page[1,4]= widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options_function,value ='CONS') #smu1
first_page[2,4]= widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options_function,value ='VAR2') #smu2 first_page[2,4]= widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options_function,value ='VAR2') #smu2
...@@ -74,9 +74,8 @@ def page_3(): ...@@ -74,9 +74,8 @@ def page_3():
third_page = GridspecLayout(24,5) third_page = GridspecLayout(24,5)
# First Line # First Line
third_page[0,0]=widgets.Dropdown(options = ['SWEEP','SAMPLING',"STRESS"], value = 'SWEEP',description ="MEASUREMENT MODE",layout=Layout(height='auto', width='auto'),style = {'description_width': 'initial'}) third_page[0,0]=widgets.Dropdown(options = ['SWEEP','SAMPLING','STRESS'], value = 'SWEEP',description ="MEASUREMENT MODE",layout=Layout(height='auto', width='auto'),style = {'description_width': 'initial'})
third_page[0,1] = widgets.Dropdown(options = ['SHORt','MEDium','LONG'], value = 'MEDium',description ="INTEGRATION TIME",layout=Layout(height='auto', width='auto'),style = {'description_width': 'initial'}) third_page[0,1] = widgets.Dropdown(options = ['SHORt','MEDium','LONG'], value = 'MEDium',description ="INTEGRATION TIME",layout=Layout(height='auto', width='auto'),style = {'description_width': 'initial'})
third_page[0,2] = widgets.FloatText(0, description = "STRESS DURATION",layout=Layout(height='auto', width='auto'),style = {'description_width': 'initial'})
# Second Line # Second Line
third_page[2,:] = widgets.Label("SWEEP SETUP",layout=Layout(height='auto', width='auto')) third_page[2,:] = widgets.Label("SWEEP SETUP",layout=Layout(height='auto', width='auto'))
...@@ -119,11 +118,11 @@ def page_3(): ...@@ -119,11 +118,11 @@ def page_3():
third_page[9,0] = widgets.Checkbox(False,description = 'HYSTERISIS',style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[9,0] = widgets.Checkbox(False,description = 'HYSTERISIS',style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
## Sampling Parameters ## Sampling Parameters
third_page[11,:] = widgets.Label("SAMPLING PARAMETERS") third_page[11,:] = widgets.Label("SAMPLING OR STRESS PARAMETERS")
third_page[12,0] = widgets.Dropdown(options=["LINear","L10","L25","L50","THINnedout"], value = 'LINear',description = 'MODE',style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[12,0] = widgets.Dropdown(options=["LINear","L10","L25","L50","THINnedout"], value = 'LINear',description = 'MODE',style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
third_page[13,0] = widgets.FloatText(1e-3,description = "INITIAL INTERVAL", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[13,0] = widgets.FloatText(1e-3,description = "INITIAL INTERVAL", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
third_page[14,0] = widgets.IntText(1001,description = "NO. OF SAMPLES", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[14,0] = widgets.IntText(1001,description = "NO. OF SAMPLES", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
third_page[15,0] = widgets.FloatText(0,description = "TOTAL SAMP. TIME", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[15,0] = widgets.FloatText(0,description = "DURATION", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
third_page[16,0] = widgets.FloatText(0,description = "HOLD TIME", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[16,0] = widgets.FloatText(0,description = "HOLD TIME", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
third_page[17,0] = widgets.Checkbox(True,description = "FILTER", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[17,0] = widgets.Checkbox(True,description = "FILTER", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto'))
......
import sys
sys.path.insert(0, './lib')
sys.path.insert(0, '..') #append parent directory
from interface import * from interface import *
import hp4155a
first_page = page_1() first_page = page_1()
second_page = page_2() second_page = page_2()
...@@ -19,6 +24,7 @@ output = widgets.Output() ...@@ -19,6 +24,7 @@ output = widgets.Output()
display(start,output) display(start,output)
#device = hp4155a.HP4155a('GPIB0::17::INSTR')
def on_start_clicked(b): def on_start_clicked(b):
with output: with output:
...@@ -55,9 +61,9 @@ def on_start_clicked(b): ...@@ -55,9 +61,9 @@ def on_start_clicked(b):
pulse = create_dict(period=third_page[4,3].value,width = third_page[5,3].value,base = third_page[6,3].value) pulse = create_dict(period=third_page[4,3].value,width = third_page[5,3].value,base = third_page[6,3].value)
#sampling parameters #sampling and stress parameters
sampling_parameters= create_dict(mode=third_page[12,0].value,interval=third_page[13,0].value,hold=third_page[16,0].value,points=third_page[14,0].value,filter=third_page[17,0].value) parameters= create_dict(mode=third_page[12,0].value,interval=third_page[13,0].value,hold=third_page[16,0].value,points=third_page[14,0].value,filter=third_page[17,0].value)
total_samp_time = third_page[13,0].value duration = third_page[13,0].value
# Constant Smus # Constant Smus
cons_smus = [] cons_smus = []
...@@ -79,7 +85,6 @@ def on_start_clicked(b): ...@@ -79,7 +85,6 @@ def on_start_clicked(b):
for i in range(8): for i in range(8):
variables.append(create_dict(name = fifth_page[6+i,0].value,unit =fifth_page[6+i,1].value)) variables.append(create_dict(name = fifth_page[6+i,0].value,unit =fifth_page[6+i,1].value))
# Check if the plotted variables are in the save list (later)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "97ee283d07e7478bb4b0ff9f9a7bdf58", "model_id": "ab0613b08d1c4593b10d5aee82e41db8",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "9082af459043410e9791775d28575cac", "model_id": "c41a8e0c74774f05b933bdc9129731c8",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "2b9417b7271b4102822c42e9d7f58e0b", "model_id": "a9e398217285490e9b1659327a45a076",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },
......
...@@ -28,6 +28,18 @@ class HP4155a(object): ...@@ -28,6 +28,18 @@ class HP4155a(object):
command = f":PAGE:STR:SET:CONS:SMU{number}:COMP {smu['comp']}" command = f":PAGE:STR:SET:CONS:SMU{number}:COMP {smu['comp']}"
self.inst.write(command) self.inst.write(command)
def smu_stress_disable(self,number:int):
command = f":PAGE:STR:SMU{number}:DIS"
self.inst.write(command)
def stress_filter(self,status:int):
command = f":PAGE:STR:SET:FILT {status}"
self.inst.write(command)
def stress_hold_time(self,time:float):
command = f":PAGE:STR:SET:HTIM {time}"
self.inst.write(command)
#set the stess time in seconds #set the stess time in seconds
def stress_time(self,time:float): def stress_time(self,time:float):
command = f":PAGE:STR:SET:DUR {time}" command = f":PAGE:STR:SET:DUR {time}"
...@@ -60,6 +72,16 @@ class HP4155a(object): ...@@ -60,6 +72,16 @@ class HP4155a(object):
while code != 0: while code != 0:
code,_ = self.error() code,_ = self.error()
def list_all_errors(self):
counter = 0
error_code, error_message = self.error()
message = f"{error_code},{error_message}"+"\n"
while error_code!=0:
counter = counter + 1
error_code, error_message = self.error()
message = message + f"{error_code},{error_message}"+"\n"
return counter, message
def operation_completed(self): def operation_completed(self):
text = self.inst.query('*OPC?') text = self.inst.query('*OPC?')
text = text.replace('\n','') text = text.replace('\n','')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment