Hello, I have this simple interrupt routine in which I would like to change robot's velocity.
I've tried BAS #VEL_PTP or even $VEL.CP variables (which normally work fine for me in PTP/LIN movement) but somehow during interrupt robot ignores this and uses last "remembered" velocity (from movement which was interrupted - for example if it was LIN motion with 0.1 m/s speed robot will move quite slow but if the interrupt was triggered during 100% PTP robot will move with his full speed).
Tech details:
Rob: KR60 L45-3, KRC4, KSS 8.3.38
Here is my code, any idea what I am doing wrong?
Code
DEF Interrupt5()
DECL E6AXIS CollOutPos
;// BRAKE F to prevent collision
BRAKE F
BAS(#VEL_PTP, 10)
$VEL.CP 0.1
;// Drive out -20mm from current position
IF Gr1_a THEN
$TOOL = Tool_data[3]
PTP $POS_INT : {X 0, Y 20, Z 0, A 0, B 0, C 0}
ENDIF
IF Gr2_a THEN
$TOOL = Tool_data[4]
PTP $POS_INT : {X 0, Y 20, Z 0, A 0, B 0, C 0}
ENDIF
IF Gr3_a THEN
$TOOL = Tool_data[5]
PTP $POS_INT : {X 0, Y 20, Z 0, A 0, B 0, C 0}
ENDIF
;// Drive back to safe position
CollOutPos = $AXIS_ACT
CollOutPos.a2 = -120
CollOutPos.a3 = 140
PTP CollOutPos
$FLAG[50]=TRUE
RESUME
END
Display More