Hi, I am programming for the Kuka and trying to store the external probe values in an array.
I am facing 2 problems.
1. The program which i have mentioned below is getting stuck at Resume and its not coming back to main programming. If I am not giving interrupt then its working fine but once I gave some external interrupt then it get stuck at Resume.
2. The points in the interrupt that is the $POS_INT values need to store in an array which is accessible outside the interrupt program.
Code
INTERRUPT DECL 10 WHEN $IN[1]==TRUE DO STOREOFFSET()
LIN{Y 0}
STARTPOINT = $POS_ACT
SEARCH($POS_ACT)
LIN STARTPOINT
LIN {Y 50}
STARTPOINT = $POS_ACT
SEARCH($POS_ACT)
LIN STARTPOINT
;----------------------------------------------------------------
DEF SEARCH(STARTPROBE:IN)
E6POS STARTPROBE
;Enable the Interrupt
INTERRUPT ON 10
;Calculate Max Probe loc, ":" is geometric operator
ENDPROBE = STARTPROBE : {X 0, Y 0, Z -100, A 0, B 0, C 0}
;Move to max probe location
LIN ENDPROBE
;Return to start
INTERRUPT OFF 10
END
;------------------------------------------------------
DEF STOREOFFSET()
E6POS PROBEPTS
;Disable the the interrupt so it doesn't get stuck in loop
INTERRUPT OFF 10
PROBEPTS = $Pos_INT
;Stop the robot
BRAKE
;Resume the main program after being interrupted
RESUME
END
Display More