Script execution

This commit is contained in:
sfop
2017-04-27 10:24:26 +02:00
parent 3c97b19cc8
commit 40d7d2169c

View File

@@ -6,9 +6,9 @@ run("Devices/WireScanner")
BPM_SENSORS = [("x","X1"), ("y","Y1"), ("q","Q1")] #(logic name sufix, channel sufix)
#Paramter parsing
prefix = args[0] if is_panel else "S30CB09-DWSC440"
prefix = args[0] if is_panel else "SINDI01-DWSC090" #"S30CB09-DWSC440"
scan_type = args[1] if is_panel else WireScanner.WireX1
scan_range = args[2] if is_panel else [-200, 200]
scan_range = args[2] if is_panel else [-200, 200, -400, 400]
cycles = args[3] if is_panel else 5
velocity = args[4] if is_panel else 200
bpms = args[5] if is_panel else get_wire_scans_bpms(prefix)
@@ -91,7 +91,7 @@ def do_scan():
print "Starting scan..."
try:
set_exec_pars(group=scan_type in [WireScanner.WireY1, WireScanner.WireY1] ? "y_{count}" : "x_{count}");
set_exec_pars(group=scan_type in "y_{count}" if [WireScanner.WireY1, WireScanner.WireY1] else "x_{count}");
do_scan()
if scan_type in [WireScanner.Set1, WireScanner.Set2]:
scanner.set_selection(get_scan_selection(scan_type))