RoboDK Forum
How can I activate an output with python on robodk ?可打印版本

+- 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: How can I activate an output with python on robodk ? (/Thread-How-can-I-activate-an-output-with-python-on-robodk)



How can I activate an output with python on robodk ?-Mr.Relmy-03-21-2023

I tried to activate an output and an input on robodk with a python program but it doesn't work, I have a UR3e Universal Robots with his controller.

screenshot of the program in attachments.


谢谢you for reading

Professor Relmy


RE: How can I activate an output with python on robodk ?-Albert-03-22-2023

You swapped the 2 parameters. You should do:
Code:
robot.setDO(7, 1)
Instead of:
Code:
robot.setDO(1, 7)