RoboDK Forum
Python IO Communication for more Programs- 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: Python IO Communication for more Programs (/Thread-Python-IO-Communication-for-more-Programs)



Python IO Communication for more Programs-semihaslan-04-23-2020

Hello everyone;

I have question for Python in RoboDK. For Ex: I have 2 program , first python script program other one normal robodk program modul.
Program 1 : setD0(0,1) // Python Program Line
Program 2 : Wait IO_0=1 // Normal RoboDK Simulation Prog

its possible? And any watchlist in RoboDK.

One more question about pause , I need wait time for just robot not program .
robot.Pause(time_ms=1000000) doesnt work. (Robot defined)


RE: Python, IO Communication for more Programs-Albert-04-24-2020

When you use digital outputs/inputs in RoboDK simulation you'll notice some station parameters that are automatically generated (such as IO_5=1 if you use DO[5]=1).

You can use waitDI as shown in the following link:
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html#robolink.Item.waitDI

The robot pause is not simulated but it is executed when you run the robot program on the robot or generate code for your robot.


RE: Python, IO Communication for more Programs-semihaslan-04-25-2020

Can you check my program ?

I can simulate Prog3 via Prog2, but I can't simulate via Prog1


RE: Python IO Communication for more Programs-semihaslan-04-30-2020

Is there anyone who knows to way ?


RE: Python IO Communication for more Programs-Albert-05-01-2020

I'm not sure I understand what you are trying to do.

Prog2 sets digital output 5 to 1 and 0 immediately. I would recommend you to add a small pause if your goal is to create a pulse.


RE: Python IO Communication for more Programs-semihaslan-05-02-2020

不是重要的事情lbert , I wrote always same question. Dont focus Set IO_5=1 or 0 .
Wait IO_5=1 in Prog 3 ? Correct ?
When I run Prog2 SetIO5=1 , Prog3 running and flowing... Thats Ok ? Because Wait IO5=1 True ?
But..... When I run Prog1 which is the Python Program ( İncluding SetIO5=1 again same like Prog2 ) Prog3 not flowing wait Wait IO5=1 line ..
Its not clear ?