Hi there,
My Kuka is equipped for milling and I have an external remote control to set certain useful parameters. Among these I have a pause and resume buttons. When I press the pause button, spindle switches off and the robot moves away from the part. This is my code:
DEF MoveAway()
BRAKE ; need to pause current robot motion
$OUT[10] = FALSE ;fieldbus reference values
$VEL.CP = 0.005
$ACC.CP = 0.01
LIN_REL {Z 50} ; move robot up
$TIMER[12] = -10000
$TIMER_STOP[12] = FALSE
WHILE NOT $TIMER_FLAG[12]
ENDWHILE
WAIT FOR NOT $OUT[7] ; wait until PAUSE is released
$OUT[10] = TRUE ;fieldbus reference values
$TIMER[13] = -10000
$TIMER_STOP[13] = FALSE
WHILE NOT $TIMER_FLAG[13]
ENDWHILE
LIN $POS_RET ; return to last position to resume work
END
Display More
By now, the tool moves away along Z world axis, so I want to replace LIN_REL {Z 50} with LIN_REL {X-50} #TOOL, to move away 50 mm along the milling tool axis.
But I'm also facing a different situation as I'm to cut some plates with a circular saw. In this case, if I would press the pause button during a cut with the saw immersed into a plate, the saw would move along tool axis (which is the tool holder axis, same direction of a regular milling bit) and I would get the saw moving against the material and damaging all stuff. I understand I should move the saw out of the material moving on the same plane of the saw but in opposite direction respect to the axis passing by the centre of the saw (i.e. the TCP) and the point where the saw touches the material in the moment I pause the job). I'm wondering what is the best manner to code this out? Of course the moveout case should be automatically selected depending on the tool loaded for the current job, so I imagine there will be also and other if statement that checks what tool is loaded.
Any suggestion?
Best,
Marco