From 99ad186cedd60875f49278fb8444af7bd032db54 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Tue, 23 Jun 2015 13:58:47 +0200 Subject: [PATCH] Script execution --- .../tests/tests/PS Tests/power-supply/power-supply.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/script/tests/tests/PS Tests/power-supply/power-supply.py b/script/tests/tests/PS Tests/power-supply/power-supply.py index 70b32f1..9471fa0 100644 --- a/script/tests/tests/PS Tests/power-supply/power-supply.py +++ b/script/tests/tests/PS Tests/power-supply/power-supply.py @@ -5,7 +5,7 @@ ret = 'Test failed' status = False -scan = ManualScan(['time'], ['SetVA', 'ActualVA', 'ActualIA'] , [0.0], [10.0], [10]) +scan = ManualScan(['time'], ['SetVA', 'ActualVA', 'ActualIA'] , [0.0], [30.0], [10]) scan.start() #Creating channels: dimension 1 @@ -40,14 +40,16 @@ for setpoint1 in frange(0.0, 120.0, 1.0, True): #Dimension 1 #LinearPositioner SetVA print 'Ramping up power supply' -for setpoint1 in frange(0.0, 10.0, 10.0, True): +for setpoint1 in frange(0.0, 30.0, 10.0, True): if setpoint1 > 50.0 or setpoint1 < 0.0: break SetVA.put(setpoint1, timeout=None) # TODO: Set appropriate timeout readback1 = SetVA.get() if abs(readback1 - setpoint1) > 0.9 : # TODO: Check accuracy - raise Exception('Actor SetVA could not be set to the value ' + str(setpoint1)) - break + raise Exception('SetVA could not be set to the value ' + str(setpoint1)) + ret = 'SetVA could not be set to the value ' + str(setpoint1) + '(measured value: '+str(readback1)+')' + status = False + break #scan quickly the output during some seconds for setpoint2 in range(0, 20): #Detector time