05-29-2025, 08:31 PM
I am facing problems controlling the end-effector of our system using the .src files generated by roboDK. My understanding is that I need 3 thighs:
1 - Access to the robotdk post-processor of Kuka KRC4.
2 - Documentation on how to add functions to the post-processor header
3 - Documentation on how to change the SetRPM() to ret = SpindleStart(%1) in the “Program Events” of the Robot Milling Project. Note that ret is a boolean variable.
DECL BOOL ret
ret = SpindleStart(5000)
Allow me to give you some context about the application.
I have a Kuka kr 500 connected to an end-efector for robotic milling. The end-effector is basically composed of a spindle and a coolant system for the milling operation. Both the coolant system and the spindle can be controlled by functions defined in KRL programs, such that we can call those functions in other KRL programs to use the hardware.
One example of the functions I mentioned is SplindleStart(Speed_RPM = int, WaitForVelocity = BOOL). SpindleStart is used to initially start spindle rotation within a part program. Input Speed_RPM is the spindle speed in rotations per minute. A negative speed causes the spindle to run in reverse. Input WaitForVelocity is an optional input that prevents further program execution until the spindle velocity reaches the programmed speed.
Ideally, I should be able to incorporate all the functions related to our end-effector in the Kuka post-processor to allow RoboDK to generate the .src files that can be uploaded directly to the Kuka controller (which uses Kuka KRC4) and start milling parts using our system.
Now, let me describe all the processes I have done:
1 - First, I generated the toolpaths using Autodesk Fusion 360 and used the RoboDK add-in to export the toolpaths to RoboDK. 2 - Second, I used RoboDK to generate the .src files for a simple facing operation. When I tried to upload the file directly to the robot, the controller did not allow me to run the file and pointed out problems related to this code block:
$LOOP_MSG[] = "/'Simple_test_roboDK v1'" - Error: Incorrect input character
Wait for StrClear($LOOP_MSG[])
$LOOP_CONT = TRUE
$LOOP_MSG[] = "/''" - Error: Incorrect input character
Wait for StrClear($LOOP_MSG[])
$LOOP_CONT = TRUE
$LOOP_MSG[] = "/'Face - 1/2d'" - Error: Incorrect input character
SetTool(7) - Error: Name not declared as subprogram
SetRPM(3759.6) - Error: Name not declared as subprogram
When I commented out all these rows, the robot was able to go through the trajectory without using the spindle.
3 - Next, I went through the roboDK documentation, and I concluded that I could change the SetRPM() to the SpindleStart() functions on the “Program Events” section of the robot machining project. However, I was not able to use “Program Events” because the KRL programs that run our end-effector hardware need a boolean variable to use the function (see example below):
DECL BOOL ret
SetCuttingTool(Mill_01)
ret = SpindleStart(5000,true)
Therefore, I assume I need to declare the boolean variable in the header and change the SetRPM() function to ret = SpindleStart(1%) at the “Program Events” of the Robot machining project.
I would be really grateful if you could provide me access to all the information I need to make the changes I mentioned. I am also open to suggestions on how I can integrate my end-effector functions into roboDK.
Some of the references I used were the following:
https://robodk.com/blog/program-end-effector/
https://robodk.com/blog/robot-end-effector-guide/
https://robodk.com/blog/robot-post-processors/
https://robodk.com/doc/en/Robot-Machinin...iningInput
Thank you very much,
iago
1 - Access to the robotdk post-processor of Kuka KRC4.
2 - Documentation on how to add functions to the post-processor header
3 - Documentation on how to change the SetRPM() to ret = SpindleStart(%1) in the “Program Events” of the Robot Milling Project. Note that ret is a boolean variable.
DECL BOOL ret
ret = SpindleStart(5000)
Allow me to give you some context about the application.
I have a Kuka kr 500 connected to an end-efector for robotic milling. The end-effector is basically composed of a spindle and a coolant system for the milling operation. Both the coolant system and the spindle can be controlled by functions defined in KRL programs, such that we can call those functions in other KRL programs to use the hardware.
One example of the functions I mentioned is SplindleStart(Speed_RPM = int, WaitForVelocity = BOOL). SpindleStart is used to initially start spindle rotation within a part program. Input Speed_RPM is the spindle speed in rotations per minute. A negative speed causes the spindle to run in reverse. Input WaitForVelocity is an optional input that prevents further program execution until the spindle velocity reaches the programmed speed.
Ideally, I should be able to incorporate all the functions related to our end-effector in the Kuka post-processor to allow RoboDK to generate the .src files that can be uploaded directly to the Kuka controller (which uses Kuka KRC4) and start milling parts using our system.
Now, let me describe all the processes I have done:
1 - First, I generated the toolpaths using Autodesk Fusion 360 and used the RoboDK add-in to export the toolpaths to RoboDK. 2 - Second, I used RoboDK to generate the .src files for a simple facing operation. When I tried to upload the file directly to the robot, the controller did not allow me to run the file and pointed out problems related to this code block:
$LOOP_MSG[] = "/'Simple_test_roboDK v1'" - Error: Incorrect input character
Wait for StrClear($LOOP_MSG[])
$LOOP_CONT = TRUE
$LOOP_MSG[] = "/''" - Error: Incorrect input character
Wait for StrClear($LOOP_MSG[])
$LOOP_CONT = TRUE
$LOOP_MSG[] = "/'Face - 1/2d'" - Error: Incorrect input character
SetTool(7) - Error: Name not declared as subprogram
SetRPM(3759.6) - Error: Name not declared as subprogram
When I commented out all these rows, the robot was able to go through the trajectory without using the spindle.
3 - Next, I went through the roboDK documentation, and I concluded that I could change the SetRPM() to the SpindleStart() functions on the “Program Events” section of the robot machining project. However, I was not able to use “Program Events” because the KRL programs that run our end-effector hardware need a boolean variable to use the function (see example below):
DECL BOOL ret
SetCuttingTool(Mill_01)
ret = SpindleStart(5000,true)
Therefore, I assume I need to declare the boolean variable in the header and change the SetRPM() function to ret = SpindleStart(1%) at the “Program Events” of the Robot machining project.
I would be really grateful if you could provide me access to all the information I need to make the changes I mentioned. I am also open to suggestions on how I can integrate my end-effector functions into roboDK.
Some of the references I used were the following:
https://robodk.com/blog/program-end-effector/
https://robodk.com/blog/robot-end-effector-guide/
https://robodk.com/blog/robot-post-processors/
https://robodk.com/doc/en/Robot-Machinin...iningInput
Thank you very much,
iago