06-01-2019, 03:28 PM
Hi,
I would like to set digital input or output instructions using the API, but RoboDK keeps crashing when I try.
For testing purposes I created a program which contains program calls (see attachment). These program calls trigger a python script and the python script is supposed to manage the IO instructions. Here is the python code:
The robot is connected and in general the IO instructions work fine, but not if they are excecuted by the python script. For some reason RoboDK can not handle the instructions that way. Is this procedure not supported by RoboDK or is it my programming that is wrong? Please let me know if I left something unclear.
I would like to set digital input or output instructions using the API, but RoboDK keeps crashing when I try.
For testing purposes I created a program which contains program calls (see attachment). These program calls trigger a python script and the python script is supposed to manage the IO instructions. Here is the python code:
Code:
from robolink import *
RDK = Robolink()
itemtype = 2
robot=RDK.Item('KUKA KR 6 R900',itemtype)
io_var = 6
io_value = 1
robot.setDO(io_var,io_value)