From 2e9feeff6683a3e15b7b74aa310b966985966e77 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Mon, 8 Jun 2015 16:20:43 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.java | 4 ++-- script/power-supply.py | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 77fef10..b2f08c9 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -62,7 +62,7 @@ public class TestingList extends Panel { Object deviceName = eval("deviceName"); Object testName = eval("testName"); - String sSuccess = (success == true) ? "Success": "Fail"; + String sSuccess = (success == true) ? "Success": "Failed"; if (ret != null) { //SwingUtils.showMessage(getComponent(), "", ret.toString() + " - " + ret.getClass().getName()); testingList.showResult(deviceName.toString(), testName.toString(), ret.toString(), sSuccess); @@ -117,7 +117,7 @@ public class TestingList extends Panel { case "Success": iconSource = "/icons/button_ok-16px.png"; break; - case "Fail": + case "Failed": iconSource = "/icons/button_delete-16px.png"; break; case "Running": diff --git a/script/power-supply.py b/script/power-supply.py index 76179be..7fbecbf 100644 --- a/script/power-supply.py +++ b/script/power-supply.py @@ -7,6 +7,9 @@ testName = "Calibrate" #device name deviceName = "RS" +#by default, failed +ret = 'test failed' +success = False scan = ManualScan(['time'], ['SetVA', 'ActualVA', 'ActualIA'] , [0.0], [20.0], [10]) scan.start() @@ -50,6 +53,7 @@ for setpoint1 in frange(0.0, 20.0, 10.0, True): readback1 = SetVA.get() if abs(readback1 - setpoint1) > 0.5 : # TODO: Check accuracy raise Exception('Actor SetVA could not be set to the value ' + str(setpoint1)) + break #scan quickly the output during some seconds for setpoint2 in range(0, 20): #Detector time @@ -58,10 +62,11 @@ for setpoint1 in frange(0.0, 20.0, 10.0, True): detector2 = ActualVA.get() detector3 = ActualIA.get() #scan.append ([setpoint1], [readback1], [detector1, detector2]) - #append(setpoints, positions, values) scan.append ([detector1], [detector1], [readback1, detector2, detector3]) - sleep( 0.1 ) # Settling time + sleep( 0.1 ) # Settling time + ret = 'test completed' + success = True #reset output to 0V SetVA.put(0.0, timeout=None) @@ -73,6 +78,3 @@ ActualIA.close() scan.end() - -ret = 'test completed' -success = True \ No newline at end of file