From 74cc94d4feb0afdd1d47e63468819e178d5722ab Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Wed, 20 May 2015 15:33:54 +0200 Subject: [PATCH] Script execution --- script/Marco/power-supply.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/script/Marco/power-supply.py b/script/Marco/power-supply.py index d9f43eb..1867d62 100644 --- a/script/Marco/power-supply.py +++ b/script/Marco/power-supply.py @@ -3,8 +3,6 @@ #Pre-actions caput('PO2DV-NCS-VHQ1:Set-RampA', '25') sleep(1.0) -caput('PO2DV-NCS-VHQ1:Set-VA', '0') -sleep(4.0) #TODO: Set the diplay names of positioners and detectors scan = ManualScan(['SetVA'], ['time', 'ActualVA'] , [0.0], [50.0], [50]) @@ -17,6 +15,17 @@ SetVA = Channel('PO2DV-NCS-VHQ1:Set-VA', type = 'd') #ScalarDetector ActualVA ActualVA = Channel('PO2DV-NCS-VHQ1:Actual-VA', type = 'd') +#set voltage to 0 +caput('PO2DV-NCS-VHQ1:Set-VA', '0') + +#wait for voltage to be 0 +for setpoint1 in frange(0.0, 50.0, 1.0, True): + detector2 = ActualVA.get() + if detector2 <= 0.0: + break + sleep(0.5) + + #Dimension 1 #LinearPositioner SetVA for setpoint1 in frange(0.0, 50.0, 1.0, True):