Kuka Robot and IO calls.- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Kuka Robot and IO calls. (/Thread-Kuka-Robot-and-IO-calls) |
Kuka Robot and IO calls.-rshanor-10-20-2022 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.
Code:
while True:
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-var-for-APIKUKA-driver RE: Kuka Robot and IO calls.-Dmitry-10-25-2022 Hi Rick, Let's start figuring out what the problem is. First of all, we need to run thekukabridgedriver in interactive mode:
Code:
user@ubuntu:~$ cd ~/RoboDK/bin
Code:
OPTION
Code:
CONNECT 192.168.0.108 7000 6
Now we can query the value of a variable with the commandGET
Code:
GET $AXIS_ACT
Code:
GETDI 1
Next, we need to make sure that you are using the latest version of KRL program (RoboDKsync543.src). You can find it in the archive at://www.sinclairbody.com/doc/drivers/Connect-KUKA-robots-with-RoboDK.zip In addition, thekukabridgecan automatically upload the program into your control system. In this case, you need to delete yourRoboDKsync???.srcfile from the control system beforehand so that thekukabridgewill definitely write the correct version. Use the commandCONFIGURE [FORCE](be careful with theFORCEoption, it will cause the$config.datfile to be automatically modified):
Code:
CONFIGURE
Now check the commandWAITDI For example, if we expectTRUEoninput 1, the command will be written as:WAITDI 1 1, and if we expectFALSE, it will be written as:WAITDI 1 0:
Code:
WAITDI 1 0
Please perform the above steps and tell us about your results. Best regards, Dmitry. RE: Kuka Robot and IO calls.-rshanor-10-27-2022 Thanks Dmitry, I will try this out when I get a chance, probably next week. |