From ca772bd048551c6daccd1da1ca12481da7156a4b Mon Sep 17 00:00:00 2001 From: gac-x11ma Date: Fri, 31 Aug 2018 17:06:33 +0200 Subject: [PATCH] Script execution --- script/test/test.py | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/script/test/test.py b/script/test/test.py index dab01cd..4210618 100644 --- a/script/test/test.py +++ b/script/test/test.py @@ -1,13 +1,46 @@ +import os +import traceback +import thread +import time -caput("X11MA-PHS:E_SP",845) +# E = [Estart, Eend, time, delay] +E1 = [270, 320, 6, 0] # C K-edge +E2 = [520, 570, 6, 0] # O K-edge +E3 = [630, 670, 6, 0] # Mn L-edge +E4 = [680, 720, 6, 0] # F K-edge +E5 = [845, 885, 6, 0] # Ni L-edge +E6 = [772, 805, 6, 0] # Co L-edge +E7 = [500, 900, 10, 0] # Survey +E8 = [700, 740, 6, 0] # Fe L-edge -Eset = 845 + + +run('EnergyMultiScan.py',E2) # O + + +caput("X11MA-KEI11:RANGE", 10) +caput("X11MA-KEI12:RANGE", 8) + +Eset = 270 error = 10.0 -while abs(error) > 0.2: +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 1.1: time.sleep(1.0) Ecurr = caget("X11MA-PGM:rbkenergy",'i') error = Eset-Ecurr - print error + +run('EnergyMultiScan.py',E1) # C - \ No newline at end of file +caput("X11MA-KEI11:RANGE", 9) +caput("X11MA-KEI12:RANGE", 8) + +Eset = 500 +error = 10.0 +caput("X11MA-PHS:E_SP",Eset) +while abs(error) > 1.1: + time.sleep(1.0) + Ecurr = caget("X11MA-PGM:rbkenergy",'i') + error = Eset-Ecurr + +run('EnergyMultiScan.py',E7) # Survey \ No newline at end of file