From 791496e53cc3bc5f871ba7f4a9655f8084a6e931 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 2 Jun 2022 14:41:19 -0400 Subject: protect against negative value setting for Vlimit --- qolab/hardware/power_supply/keysight_e3612a.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qolab/hardware/power_supply') 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: -- cgit v1.2.3