Script execution
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
scan_complete=False
|
||||
scan_result = None
|
||||
|
||||
def check_end_scan(record, scan):
|
||||
def check_end_scan(record, scan):
|
||||
global scan_complete, scan_result
|
||||
if record.index>=50:
|
||||
print "Data aquisition completed"
|
||||
@@ -9,8 +9,8 @@ def check_end_scan(record, scan):
|
||||
scan_complete=True
|
||||
record.cancel()
|
||||
scan_result = scan.result
|
||||
#elif (record.index>0) and (record.index % 10 == 0):
|
||||
# get_context().dataManager.splitScanData(scan)
|
||||
elif (record.index>0) and (record.index % 10 == 0):
|
||||
get_context().dataManager.splitScanData(scan)
|
||||
|
||||
|
||||
xxx=None
|
||||
@@ -18,15 +18,15 @@ def do_scan():
|
||||
global scan_complete, scan_result
|
||||
scan_complete=False
|
||||
try:
|
||||
mscan (sin, [sin,arr], -1, -1, after_read = check_end_scan, range="auto")
|
||||
mscan (sin, [sin,arr], -1, -1, after_read = check_end_scan)
|
||||
except:
|
||||
if not scan_complete:
|
||||
raise
|
||||
return scan_result
|
||||
|
||||
|
||||
set_exec_pars(group="x_{count}", layout = "SF", reset=True);
|
||||
#set_exec_pars(group="x_{count}", tag = "scan 1", reset=True);
|
||||
#set_exec_pars(group="x_{count}", reset=True, layout = "SF");
|
||||
|
||||
r1 =do_scan()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user