From 26153cd07584ea1add4750bfae2ad2523b5dc72c Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Thu, 4 May 2017 17:25:05 +0200 Subject: [PATCH] Script execution --- script/Devices/WireScanner.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/script/Devices/WireScanner.py b/script/Devices/WireScanner.py index 631ae6a..9052368 100644 --- a/script/Devices/WireScanner.py +++ b/script/Devices/WireScanner.py @@ -146,14 +146,23 @@ class WireScanner(WireScanInfo): def abort(self): caputq(self.prefix + ":ABORT.PROC", 1) - def init(self): + def init(self, wait=False): #if self.selection is not None: # self.wire_sel.put(WireScanner.Selection.index(self.selection)) caputq(self.prefix + ":INIT.PROC", 1) + if wait: + self.wait_in_selection() - def park(self): + def park(self, wait=False): caputq(self.prefix + ":GARAGE_SEL.PROC", 1) caputq(self.prefix + ":INIT.PROC", 1) + if wait: + self.wait_in_selection() + + def wait_in_selection(self): + time.sleep(3.0) + scanner.waitValue("At start", 60000) + #time.sleep(0.5) def scan(self): self.cycles = self.nb_cycles.get()