From c214f8f5fd48d734c794522dec72679beeb3e6af Mon Sep 17 00:00:00 2001 From: gac-x11ma Date: Fri, 31 Aug 2018 16:38:14 +0200 Subject: [PATCH] Script execution --- script/MultiScan.py | 93 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 71 insertions(+), 22 deletions(-) diff --git a/script/MultiScan.py b/script/MultiScan.py index bcdb396..51e8e32 100644 --- a/script/MultiScan.py +++ b/script/MultiScan.py @@ -17,43 +17,92 @@ E8 = [700, 740, 6, 0] # Fe L-edge #run('EnergyMultiScan.py',E) -#caput("X11MA-VME-ES4:TRX", 6.5) -#caput("X11MA-VME-ES4:TRY", 2.5) -#caput("X11MA-VME-ES4:TRZ", 7.8) +caput("X11MA-VME-ES4:TRX", 6.5) +caput("X11MA-VME-ES4:TRY", 3.4) +caput("X11MA-VME-ES4:TRZ", 15.8) -#time.sleep(1.0) +time.sleep(1.0) -#run('EnergyMultiScan.py',E5) # Ni -#run('EnergyMultiScan.py',E6) # Co +Eset = 845 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 0.2: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + print error -#caput("X11MA-KEI11:RANGE", 8) -#caput("X11MA-KEI12:RANGE", 7) +run('EnergyMultiScan.py',E5) # Ni -#time.sleep(1.0) -#run('EnergyMultiScan.py',E4) # F +Eset = 772 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 0.2: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + print error -#caput("X11MA-KEI11:RANGE", 9) -#caput("X11MA-KEI12:RANGE", 8) +run('EnergyMultiScan.py',E6) # Co -#caput("X11MA-PHS:E_SP",520) -#time.sleep(1.0) -#run('EnergyMultiScan.py',E2) # O +caput("X11MA-KEI11:RANGE", 8) +caput("X11MA-KEI12:RANGE", 7) -#caput("X11MA-KEI11:RANGE", 10) -#caput("X11MA-KEI12:RANGE", 8) +Eset = 680 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 0.2: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + print error -#caput("X11MA-PHS:E_SP",270) -#time.sleep(1.0) -run('EnergyMultiScan.py',E1) # C +run('EnergyMultiScan.py',E4) # F caput("X11MA-KEI11:RANGE", 9) caput("X11MA-KEI12:RANGE", 8) -caput("X11MA-PHS:E_SP",500) -time.sleep(1.0) +Eset = 520 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 0.2: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + print error + +run('EnergyMultiScan.py',E2) # O + + +caput("X11MA-KEI11:RANGE", 10) +caput("X11MA-KEI12:RANGE", 8) + +Eset = 270 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 0.2: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + print error + +run('EnergyMultiScan.py',E1) # C + + +caput("X11MA-KEI11:RANGE", 9) +caput("X11MA-KEI12:RANGE", 8) + +Eset = 500 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 0.2: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + print error run('EnergyMultiScan.py',E7) # Survey