Hello,
I have been working on kuka interrupts. I have two position P1 and P2, When the robot moves from P1 to P2, if $IN[1] == true THEN i want to stop the robot there, record the position and turn on the vaccum.
DEF INTERRUPT()
GLOBAL INTERRUPT DECL 20 WHEN $IN[1]==TRUE DO SUB()
PTP APPROCH_POS
PTP P1
INTERRUPT ON 20
PTP P2
INTERRUPT OFF 20
DEF SUB()
INTERRUPT OFF 20
XP1.Z = $POS_ACT.Z -100
LIN XP1
Vaccum_ON()
END
I have this code but when the signal turns on while moving from P1 to P2, the position is saved, but the robot still move to P2 and then jumps to the sub program. Infact I dont want robot to reach the desired P2 position but I want robot to stop where the signal is triggered and immediately jump to the sub program and Offset the position by - 100 mm and move to the point P1 and turn on the vaccum.
Can anyone suggest any other way if you know. Kindly correct me if I am going wrong here.