Script execution

This commit is contained in:
sfop
2016-06-14 16:19:17 +02:00
parent c4493670be
commit 4b8e8af51c
+21 -2
View File
@@ -8,7 +8,7 @@
# change the current of the gun soleoid
# look at the centroid position (BPM or screen) downstream of the gun.
I_set = Channel("SINEG01-MSOL130:I-SET")
I_set = Channel("SINEG01-MSOL130:I-SET");
I_get = Channel("SINEG01-MSOL130:I-READ")
# cam_x, cam_y = ... # some camtool command / channel?
bpm_x = Channel("SINEG01-DBPM340:X1")
@@ -16,6 +16,13 @@ bpm_y = Channel("SINEG01-DBPM340:Y1")
cam_x = Channel("SINEG01-DSCR190:profile.X_stats.com")
cam_y = Channel("SINEG01-DSCR190:profile.Y_stats.com")
cam_raw_data = Channel("SINEG01-DSCR190:data")
set_device_alias(I_set, "I_set")
set_device_alias(I_get, "I_get")
set_device_alias(cam_x, "cam_x")
set_device_alias(cam_y, "cam_y")
def ccr(mag):
n = 1
@@ -27,6 +34,18 @@ def laser_on():
def laser_off():
caput("SIN-TIMAST-TMA:Beam-Las-Delay-Sel", 1)
def run_pipeline():
caput("camtool...:start")
while !caget("camtool...:done"):
sleep(0.1)
caget("camtool....:data")
#caget("camtool....:X_stats.com")
#caget("camtool....:X_stats.com")
I1 = 20.0
I2 = 150.0
@@ -53,7 +72,7 @@ laser_on()
# Scan using the BPM
try:
#r = lscan(I_set, [I_get, cam_x, cam_y], I1, I2, dI, 1.0, before_read = ccr)
r = lscan(I_set, [I_get, cam_x, cam_y], I1, I2, dI, 1.0)
r = lscan(I_set, [I_get, cam_x, cam_y, cam_raw_data], I1, I2, dI, 1.0)
finally:
laser_off()