Rockwell Automation GMLC Reference Manual User Manual
Page 568

Publication GMLC-5.2 - November 1999
531
You use an End Program block, configured for When End of Fault with
Go to When End if Runtime Fault Occurs selected, to intercept runtime
faults, which occur while the application program is running. The When
End or Fault sequence should evaluate the Runtime_fault variable, correct
the problem, set Runtime_fault to zero to clear the fault, and restart the
program or the tasks as required.
If the diagram contains an End Program block without Go to When End if
Runtime Fault selected, or if an End Program block is not included in the
diagram, the program aborts when a runtime fault occurs. You then can
use the Show Program Status block from the Online Manager to check the
Runtime_fault variable and determine which fault occurred.
Stack Fault
A Stack fault (Runtime_fault = 35) occurs when the “program stack” (an
assigned portion of working memory, or DRAM) no longer accurately
directs the flow of program execution.
Note: Stack Fault applies to iCODE versions 3.0 and higher.
The program stack contains references (or pointers) to locations in the
application program iCODE script. Each time program execution
“jumps” to another, non-sequential part of the iCODE script a pointer to
the location in the iCODE - from which program execution “jumped” - is
stored in the program stack. This pointer is used to return program
execution to the original point of departure, when execution of the non-
sequential code is complete.
5
Missing [ or ] in Command
4
Missing Label for Goto
3
Missing = in Expression
2
Missing Comma (,) in Command
1
Illegal Command
0
No Fault Detected
Fault
Value
Description