From 94a9ce1d01d5f7dc724f71f9d055dbae23ae3c87 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Thu, 26 Jan 2017 16:18:21 +0100 Subject: [PATCH] Script execution --- script/local.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/script/local.py b/script/local.py index d468139..c0e2152 100644 --- a/script/local.py +++ b/script/local.py @@ -36,11 +36,10 @@ class RobotModbus(DeviceBase): robot_req.write(0) def execute(self, command, *argv): - #print "Done" - if robot_req.read() != 0: - raise Exception("Ongoing command") - if robot_ack.read() != 0: - raise Exception("Robot is not ready") + #if robot_req.read() != 0: + # raise Exception("Ongoing command") + #if robot_ack.read() != 0: + # raise Exception("Robot is not ready") robot_cmd.write(command) args = [0,0,0,0,0,0] index = 0 @@ -62,13 +61,13 @@ class RobotModbus(DeviceBase): def request(self): robot_req.write(1) - while robot_ack.read() == 0: - time.sleep(0.001) + #while robot_ack.read() == 0: + # time.sleep(0.001) def cancel_request(self): robot_req.write(0) - while robot_ack.read() != 0: - time.sleep(0.001) + #while robot_ack.read() != 0: + # time.sleep(0.001) def mount(self, puck, sample): return self.execute('1', '1', puck, sample)