Technical data
Diagnostics
23.6 Diagnosing in STOP Mode
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 493
23.6.2 Stack Contents in STOP Mode
By evaluating the diagnostic buffer and the stack contents you can determine the cause of the fault
in the processing of the user program.
If, for example, the CPU has gone into STOP as a result of a programming error or the STOP
command, the "Stacks" tab in the module information displays the block stack. You can display the
contents of the other stacks using the "I Stack", "L Stack", and "Nesting Stack" buttons. The stack
contents give you information on which instruction in which block led to the CPU going into STOP.
B Stack Contents
The B stack, or block stack, lists all the blocks that were called before the change to STOP mode
and which were not completely processed.
I Stack Contents
When you click the "I Stack" button, the data at the interrupt location are displayed. The I stack, or
interrupt stack, contains the data or the states which were valid at the time of the interrupt, for
example:
• Accumulator contents and register contents
• Open data blocks and their size
• Content of the status word
• Priority class (nesting level)
• Interrupted block
• Block in which program processing continues after the interrupt
L Stack Contents
For every block listed in the B stack, you can display the corresponding local data by selecting the
block and clicking the "L Stack" button.
The L stack, or local data stack, contains the local data values of the blocks the user program was
working with at the time of the interrupt.
In-depth knowledge of the system is required to interpret and evaluate the local data displayed.
The first part of the data displayed corresponds to the temporary variables for the block.
Nesting Stack Contents
When you click the "Nesting Stack" button, the contents of the nesting stack at the interrupt
location are displayed.
The nesting stack is a memory area that the logic operations A(, AN(, O(, ON(, X(, and XN( use.
The button is only active if bracket expressions were still open at the time of interruption.