I am using a Kuka KR60 HA with a custom program to use it's tool.
To start the tool i have to add a command "SPINDEL(#ON)" and to stop it "SPINDEL(#OFF)".
I did create offline a robot program with RoboDK and add the commands as custom code instruction. If i manually copy the program onto the robotcontroller and execute the program it work. Thats great!
Now i want to do the excution directly from RoboDK. I did follow the instructions from https://robodk.com/doc/en/Robots-KUKA.html#DriverKUKA and I can now execute move commands. So the connection seems to be working. But if I execute my program the tool does not turn on. So the robot moves with an inactive tool.
To solve the issue i looked into the RoboDksync562.src and found this case at line 176:
Do i have to replace "; Drill()" with "SPINDEL(#ON)" and "; Cut()" with "SPINDEL(#OFF)"?
What are the correct instruction to add to a program in RoboDK? As an example, will the instruction "SPINDEL(#OFF)" in image still be correct or has it to change to "2" for "CASE 2"?
It would be nice if someone can show me an example on how to do it!
addcustomcode.PNG (Size: 4.75 KB / Downloads: 46)
To start the tool i have to add a command "SPINDEL(#ON)" and to stop it "SPINDEL(#OFF)".
I did create offline a robot program with RoboDK and add the commands as custom code instruction. If i manually copy the program onto the robotcontroller and execute the program it work. Thats great!
Now i want to do the excution directly from RoboDK. I did follow the instructions from https://robodk.com/doc/en/Robots-KUKA.html#DriverKUKA and I can now execute move commands. So the connection seems to be working. But if I execute my program the tool does not turn on. So the robot moves with an inactive tool.
To solve the issue i looked into the RoboDksync562.src and found this case at line 176:
Code:
; Run Subprogram by ID from COM_VALUE1
; To trigger from RoboDK use robot.RunCodeCustom("Program ID", INSTRUCTION_CALL_PROGRAM)
CASE 13
program_id = COM_VALUE1
SWITCH program_id
CASE 1
; Drill()
CASE 2
; Cut()
ENDSWITCH
COM_VALUE1 = 0
COM_ACTION = 0
Do i have to replace "; Drill()" with "SPINDEL(#ON)" and "; Cut()" with "SPINDEL(#OFF)"?
What are the correct instruction to add to a program in RoboDK? As an example, will the instruction "SPINDEL(#OFF)" in image still be correct or has it to change to "2" for "CASE 2"?
It would be nice if someone can show me an example on how to do it!
