From 05f43ea86567913e24ea5f9b45e8b2f81bd407fa Mon Sep 17 00:00:00 2001
From: unknown <asoalexandros@gmail.com>
Date: Tue, 18 Mar 2025 14:00:06 +0100
Subject: [PATCH] Stress Functions fixed (apparently the new class was never
 used for measurements)

---
 hp4155/Custom_SMU/lib/interface.py     |  2 +-
 hp4155/Custom_SMU/test_interface.ipynb |  8 ++++----
 hp4155/hp4155a.py                      | 13 +++++++++++--
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/hp4155/Custom_SMU/lib/interface.py b/hp4155/Custom_SMU/lib/interface.py
index 9d61854..f320da6 100644
--- a/hp4155/Custom_SMU/lib/interface.py
+++ b/hp4155/Custom_SMU/lib/interface.py
@@ -38,7 +38,7 @@ def page_1():
     
 
     #Fifth column function
-    options_function= ['VAR1','VAR2','VARD','CONS','SYNC','NSYNC']
+    options_function= ['VAR1','VAR2','VARD','CONS']
     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[2,4]= widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options_function,value ='VAR2') #smu2
diff --git a/hp4155/Custom_SMU/test_interface.ipynb b/hp4155/Custom_SMU/test_interface.ipynb
index 47fea4f..d1b0521 100644
--- a/hp4155/Custom_SMU/test_interface.ipynb
+++ b/hp4155/Custom_SMU/test_interface.ipynb
@@ -9,7 +9,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "ab0613b08d1c4593b10d5aee82e41db8",
+       "model_id": "881e72368c0d4a38a12413a23d573b7d",
        "version_major": 2,
        "version_minor": 0
       },
@@ -23,7 +23,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "c41a8e0c74774f05b933bdc9129731c8",
+       "model_id": "b63db9b2c25d444eb3d18bc611032968",
        "version_major": 2,
        "version_minor": 0
       },
@@ -37,7 +37,7 @@
     {
      "data": {
       "application/vnd.jupyter.widget-view+json": {
-       "model_id": "a9e398217285490e9b1659327a45a076",
+       "model_id": "f88cceabc2954893adb3528ea5aa9307",
        "version_major": 2,
        "version_minor": 0
       },
@@ -78,7 +78,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.12.0"
+   "version": "3.11.4"
   }
  },
  "nbformat": 4,
diff --git a/hp4155/hp4155a.py b/hp4155/hp4155a.py
index d21d94c..6847323 100644
--- a/hp4155/hp4155a.py
+++ b/hp4155/hp4155a.py
@@ -22,10 +22,11 @@ class HP4155a(object):
         command = f":PAGE:STR:SMU{number}:MODE {smu['mode']};FUNC {smu['func']};NAME {repr(smu['name'])}"
         self.inst.write(command)
 
-        command =f":PAGE:STR:SET:CONS:SMU{number} {smu['value']}"
+    def setup_smu_stress(self,value,comp):
+        command =f":PAGE:STR:SET:CONS:SMU{number} {value}"
         self.inst.write(command)
         
-        command = f":PAGE:STR:SET:CONS:SMU{number}:COMP {smu['comp']}"
+        command = f":PAGE:STR:SET:CONS:SMU{number}:COMP {comp}"
         self.inst.write(command)
 
     def smu_stress_disable(self,number:int):
@@ -44,6 +45,14 @@ class HP4155a(object):
     def stress_time(self,time:float):
         command = f":PAGE:STR:SET:DUR {time}"
         self.inst.write(command)
+
+    def stress_disable_not_smu(self):
+        self.inst.write(":PAGE:STR:VSU1:DIS")
+        self.inst.write(":PAGE:STR:VSU2:DIS")
+
+    def stress_smu_disable(self,number:int):
+        command = f":PAGE:STR:SMU{number}:DIS"
+        self.inst.write(command)
         
     #start stress operation
     def start_stress(self):
-- 
GitLab