aboutsummaryrefslogtreecommitdiff
path: root/qolab
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-06-02 14:41:19 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-06-02 14:41:19 -0400
commit791496e53cc3bc5f871ba7f4a9655f8084a6e931 (patch)
tree5ba841ea844fdbef28365663c17c5c318f861027 /qolab
parentd4438c8c71e7e0e010d69c0f31eed7078319c3e7 (diff)
downloadqolab-791496e53cc3bc5f871ba7f4a9655f8084a6e931.tar.gz
qolab-791496e53cc3bc5f871ba7f4a9655f8084a6e931.zip
protect against negative value setting for Vlimit
Diffstat (limited to 'qolab')
-rw-r--r--qolab/hardware/power_supply/keysight_e3612a.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/qolab/hardware/power_supply/keysight_e3612a.py b/qolab/hardware/power_supply/keysight_e3612a.py
index 6731caa..e106279 100644
--- a/qolab/hardware/power_supply/keysight_e3612a.py
+++ b/qolab/hardware/power_supply/keysight_e3612a.py
@@ -94,6 +94,8 @@ class KeysightE3612A(PowerSupplySCPI):
@BasicInstrument.tsdb_append
def setChanVlimit(self, chNum, val):
+ if val < 0:
+ val=0
if chNum == 1 and val > 6.180:
val = 6.180
if (chNum == 2 or chNum == 3) and val > 25.750: