Hey guys!
Here is a overview of the KRL program i am trying to understand.
Code
DEF cell()
INTERRUPT DECL 1 WHEN STOP_INT DO STOP_ROBOT( )
LOOP
SWITCH PRNUM
CASE 1
main_program()
IF STOP_ERROR THEN
main_program()
ENDIF
CASE 2
second_program()
IF STOP_ERROR THEN
second_program()
ENDIF
ENDSWITCH
ENDLOOP
END
DEF STOP_ROBOT ( )
INTERRUPT OFF 1
BRAKE
STOP_ERROR=TRUE
RESUME
END
Display More
As you can see, when a program number PRNUM = 1 is selected the main_program() runs. but during the execution of the main_program(), if the Interrupt STOP_INT is true then the STOP_ROBOT() function is executed. so my question is when the program reaches the RESUME it aborts the main_program() and starts again from the LOOP or from the
IF STOP_ERROR THEN line? I would like to know when the RESUME is executed on program interrupt where does the execution start again?
Thanks a lot in advance!