Hi Jens,
Albert and I just ran a few tests and there were indeed a few bugs.
Some things were missing in your code and some were missing in ours.
We should release a fixed version of RoboDK later today.
Your code should look a bit like this.
Also, make sure the Listen Node is running on the controller.
Jeremy
Albert and I just ran a few tests and there were indeed a few bugs.
Some things were missing in your code and some were missing in ours.
We should release a fixed version of RoboDK later today.
Your code should look a bit like this.
Code:
#Set Robot
robot = RDK.Item('TM12',ITEM_TYPE_ROBOT)
if robot.Connect():
print('connection ok')
else:
print('connection failed')
#collision checking
CHECK_COLLISIONS = False
RDK.setCollisionActive(COLLISION_ON if CHECK_COLLISIONS else COLLISION_OFF)
delay = 1 #delay in seconds
for i in range (0,11):
di = robot.getDI(i)
print(i, "input:", di)
time.sleep(delay)
Also, make sure the Listen Node is running on the controller.
Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间
and by watching tutorials on ourYoutube Channel.