From c10130e0341267e45a2bf952542d3479d37df024 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Wed, 20 May 2015 12:02:24 +0200 Subject: [PATCH] Script execution --- script/Marco/power-supply.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/script/Marco/power-supply.py b/script/Marco/power-supply.py index a3fbbb5..8cf59aa 100644 --- a/script/Marco/power-supply.py +++ b/script/Marco/power-supply.py @@ -7,35 +7,35 @@ caput('PTEST-VME-VHQ1:Set-VA', '0') sleep(4.0) #TODO: Set the diplay names of positioners and detectors -scan = ManualScan(['Set-VA'], ['time', 'Actual-VA'] , [0.0], [50.0], [50]) +scan = ManualScan(['SetVA'], ['time', 'ActualVA'] , [0.0], [50.0], [50]) scan.start() #Creating channels: dimension 1 -#LinearPositioner Set-VA -Set-VA = Channel('PTEST-VME-VHQ1:Set-VA', type = 'd') +#LinearPositioner SetVA +SetVA = Channel('PTEST-VME-VHQ1:Set-VA', type = 'd') #Timestamp time -#ScalarDetector Actual-VA -Actual-VA = Channel('PTEST-VME-VHQ1:Actual-VA', type = 'd') +#ScalarDetector ActualVA +ActualVA = Channel('PTEST-VME-VHQ1:Actual-VA', type = 'd') #Dimension 1 -#LinearPositioner Set-VA +#LinearPositioner SetVA for setpoint1 in frange(0.0, 50.0, 1.0, True): if setpoint1 > 50.0 or setpoint1 < 0.0: break - Set-VA.put(setpoint1, timeout=None) # TODO: Set appropriate timeout - readback1 = Set-VA.get() + SetVA.put(setpoint1, timeout=None) # TODO: Set appropriate timeout + readback1 = SetVA.get() if abs(readback1 - setpoint1) > 0.5 : # TODO: Check accuracy - raise Exception('Actor Set-VA could not be set to the value ' + str(setpoint1)) + raise Exception('Actor SetVA could not be set to the value ' + str(setpoint1)) sleep( 1.0 ) # Settling time #Detector time detector1 = float(java.lang.System.currentTimeMillis()) - #Detector Actual-VA - detector2 = Actual-VA.get() + #Detector ActualVA + detector2 = ActualVA.get() scan.append ([setpoint1], [readback1], [detector1, detector2]) #Closing channels -Set-VA.close() -Actual-VA.close() +SetVA.close() +ActualVA.close() scan.end()