I need to generate an offline robot program by directly recording a stream of Python API commands.
The problem I am having is that no file is created, and I am at a complete loss. I have tried 100+ variants and looked at every doc and example I can find.
Manual program generation and MakeProgram() both work, but I need the stream recorded instead.
ProgramStart returns 0 errors, but no robot program file is generated after RDK.Finish().
I reproduced the same issue with a clean ABB station using ABB_RAPID_IRC5 and separately with FANUC using Fanuc_R30i.
Is there an additional step required when using RUNMODE_MAKE_ROBOTPROG and ProgramStart, , or am I misunderstanding the intended use of this run mode?
RoboDK 6.0.6, Python 3.13, robodk package 5.9.4.
Code:
The problem I am having is that no file is created, and I am at a complete loss. I have tried 100+ variants and looked at every doc and example I can find.
Manual program generation and MakeProgram() both work, but I need the stream recorded instead.
ProgramStart returns 0 errors, but no robot program file is generated after RDK.Finish().
I reproduced the same issue with a clean ABB station using ABB_RAPID_IRC5 and separately with FANUC using Fanuc_R30i.
Is there an additional step required when using RUNMODE_MAKE_ROBOTPROG and ProgramStart, , or am I misunderstanding the intended use of this run mode?
RoboDK 6.0.6, Python 3.13, robodk package 5.9.4.
Code:
Code:
from robodk.robolink import *
import time
RDK = Robolink()
RDK.AddFile("C:/Users/Sam/code/robodk_stations/test_station.rdk")
robot = RDK.Item("ABB CRB 1300-7/1.4", ITEM_TYPE_ROBOT)
t1 = RDK.Item("safe_target_1", ITEM_TYPE_TARGET)
t2 = RDK.Item("safe_target_2", ITEM_TYPE_TARGET)
RDK.setRunMode(RUNMODE_MAKE_ROBOTPROG)
errors = RDK.ProgramStart(
"Prog123",
"C:/Users/Sam/Downloads/",
"ABB_RAPID_IRC5",
robot
)
print("ProgramStart errors:", errors)
robot.MoveJ(t1)
robot.MoveL(t2)
RDK.Finish()

