RoboDK Forum
Generate subprogram instructions可打印版本

+- 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: Generate subprogram instructions (/Thread-Generate-subprogram-instructions)



Generate subprogram instructions-balazs.szabo58-03-07-2022

Is there any way to generate not only the Program Call instruction in the G-Code but the whole Subprogram with all it's movements?

So I've tried this method in my Main-program:
Code:
prog1 = RDK.Item('Path1', ITEM_TYPE_PROGRAM)

prog1.RunCode()
while prog1.Busy():
robot.Pause(0.1)

And also the RunProgram command.
Both of these generated only the Program call instruction in the G-Code and not the sub-program(Path1) itself.

Code:
.PROGRAM MainProg()
; Program generated by RoboDK v5.4.1 for Kawasaki RS050N on 07/03/2022 10:09:18
CALL Path1
.END

Is it possible to generate the whole Path1 sub-program when I generate my Main?


RE: Generate subprogram instructions-Jeremy-03-07-2022

“工具”- >“选项”- >“程序”
Check "Inline subprograms"