Closedown

This commit is contained in:
gac-S_Changer
2017-01-26 16:21:16 +01:00
parent 94a9ce1d01
commit 682123b6d9
2 changed files with 9 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import java.lang.System as System
index = 0
max_time = 0

View File

@@ -36,10 +36,10 @@ class RobotModbus(DeviceBase):
robot_req.write(0)
def execute(self, command, *argv):
#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
@@ -61,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)