10-20-2022, 07:24 PM
Hi,
I am using the PythonAPI to control the robot using online programming using the kukabridge driver.
I am trying to implement a function to pause the robot when a user opens a door connected to a digital input.
Process 1 is commanding the robot as usual.
Process 2 is reading DI1 and calling robot.pause or setting other parameters as necessary.
I am having two problems here, and not sure if they are related.
First, reading the digital input in a look seems to mess up the robot driver somehow. If I am running the following code in process 2, I get a bunch of TargetReachErrors which I have not seen in any other circumstances.
Second, none of the other DI API calls like waitDI or getDI seem to work for me. You could imagine a better implementation of the loop above just waiting for a signal.
Looks like some other people have had issues related to this API://www.sinclairbody.com/forum/Thread-getDI-io...UKA-driver
I am using the PythonAPI to control the robot using online programming using the kukabridge driver.
I am trying to implement a function to pause the robot when a user opens a door connected to a digital input.
Process 1 is commanding the robot as usual.
Process 2 is reading DI1 and calling robot.pause or setting other parameters as necessary.
I am having two problems here, and not sure if they are related.
First, reading the digital input in a look seems to mess up the robot driver somehow. If I am running the following code in process 2, I get a bunch of TargetReachErrors which I have not seen in any other circumstances.
Code:
while True:
print(robot.setParam("Driver", "GET $IN[1]"))
time.sleep(0.2)
Second, none of the other DI API calls like waitDI or getDI seem to work for me. You could imagine a better implementation of the loop above just waiting for a signal.
Looks like some other people have had issues related to this API://www.sinclairbody.com/forum/Thread-getDI-io...UKA-driver