hi i have in the program main() : switch...case
each case call to subprogram() with interruption
after interruption robot do the last action, contained in the same subprogram()..
i like to do in after the interruption robot go to program main()
tkx.
hi i have in the program main() : switch...case
each case call to subprogram() with interruption
after interruption robot do the last action, contained in the same subprogram()..
i like to do in after the interruption robot go to program main()
tkx.
Post actual program code. Your description is too vague.
Research KRL commands BRAKE and RESUME.
GLOBAL INTERRUPT DECL 4 WHEN Presence==FALSE DO Fn_STOP( )
....
SWITCH iSubscribe
CASE 1 ;GOTO HOME
CHECK_HOME()
CASE 10
INTERRUPT ON 4
CONTINUE
WAIT SEC 0.012
GotoFN()
CASE 20 ; GOTO HOME1
..
CASE 21 ; GOTO DROWER
...
ENDSWITCH
Display More
GLOBAL DEF GotoFN()
PTP PFN
INTERRUPT OFF 4
doVacuumAspir=TRUE
WHILE (diDetected==FALSE OR($POS_ACT.Z<220))
LIN_REL{Z-4}
ENDWHILE
END
how to exit the switch case statement
that is not the actual code. if it was, you would get tons of errors. as mentioned before, research RESUME command and proper program structure that can use it.
"RESUME cancels all running interrupt programs and subprograms up to the
level at which the current interrupt was declared." This leads me to believe that what you need is the SWITCH to be in a subprogram whist keeping the interrupt DECL in Main. Give it a go and see if it works.
"RESUME cancels all running interrupt programs and subprograms up to the
level at which the current interrupt was declared." This leads me to believe that what you need is the SWITCH to be in a subprogram whist keeping the interrupt DECL in Main. Give it a go and see if it works.
error: RESUME INADMISSIBLE FOR GLOBAL INTERRUPTS
Well it is pretty self explanatory - it cannot be used in GLOBAL interrupts, change it.