Hello everybody,
I have a Delta Robot Kuka KR3 D1200 HM, I´ve been trying for a while to fnd a way to use the code below.
I have a sensor on input 5.
I need to stop the LIN P2 movement when the sensor actuates.
When the sensor activates, i make the sequence of INTERRUPT movements.
I need to make that after the RESUMEm the program goes back to running the DEF MOVIMENTO() again, "starting" from the "LOOP".
I am not able to return the pointer from $ADVANCED=3
I need the program to stay in this LOOP always executing the DEF MOVIMENTO() function.
Today, in this code, after RESUME the code stops in the DEF ParadaSensorLaser() function.
Please, help me with some solution.
After RESUME happens, I need the DEF MOVIMENTO() function to run again.
Thank You!
CODE:
DEF ParadaSensorLaser()
INI
INTERRUPT DECL 10 WHEN $IN[5] DO ParadaRapida()
SPTP HOME
$ADVANCE =3
MOVIMENTO()
END
DEF MOVIMENTO()
LOOP
LIN P1
INTERRUPT ON 10
LIN P2
INTERRUPT OFF 10
ENDLOOP
END
DEF ParadaRapida()
BRAKE F
LIN P4
LIN P5
LIN P6
RESUME
END