Hopefully someone can tell me what I'm doing wrong here. We use a KUKA bot to do mig welding in our plant. It is equiped with a torch collision clutch that triggers a BRAKE F when the welding torch comes in contact with the workpiece. I have been trying to program the collision interrupt sub-program so that if the torch hits something and triggers the interrupt, the opperator is able to back the torch out through the -X direction of the TCP coordinate system. This will eliminate the need for the Opperator to use the KCP. Here is my code so far -
DEF SAFETY_HOLDER( )
GLOBAL INTERRUPT OFF 5
BRAKE F ;Fast brake
WHILE $IN[5]==FALSE ;Input for collision box
IF ($IN[264]==TRUE)THEN ;Button on input panel
LIN_REL {X-10} #TOOL
ENDIF
ENDWHILE
WAIT SEC 0
HALT
wait for ($IN[5]==TRUE)
GLOBAL INTERRUPT ON 5
END
Even with the #TOOL command though, my robot seems to want to move according to the base when the input is pressed. I've used a similar code to automatically back the torch out in the event of an arc start failure but for some reason I am having no luck here. What am I doing wrong here?
Thanks!