Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Calling programs inside MAIN python API script

#1
Hello RoboDK community,


I have a question. I made two python scripts for two robots inside one cell. One of them is a MAIN program, and the other is a subroutine that executes for a few seconds only when particular conditions are reached. Can I call the subroutine program from the MAIN python script and how?
Or if I write a simple program inside RoboDK main screen instead of python script will then calling it from the main python script be possible?
请help.


Thank you!
#2
Hello,

You can call any other program/script in the station using RunProgram()
Documentation Link://www.sinclairbody.com/doc/en/PythonAPI/robo...RunProgram

Code:
py_script = RDK.Item('Prog2')
py_script.RunProgram()

Here, I retrieve the Python script Prog2 and then run it using RunProgram()
#3
Thanks!




Users browsing this thread:
1 Guest(s)