Professional Documents
Culture Documents
Istack 1
Istack 1
Istack 1
Note
You can display the control bits in any mode. You can display
the ISTA C K only in the STO P mode.
• The control bits indicate the current and previous operating status
and the cause of the problem.
If several errors occurred, the control bits indicate all of them.
Note
The text on the screen of your programmer depends on the PG
software used. It may differ from the screen represented here.
Nevertheless, the description of the individual positions on the
screen in these programming instructions is valid.
5.7.1
Control Bits When you display the ISTACK on the PG the statuses of the control
bits are shown on the first screen page (see Fig. 5-1).
C O N T R O L B I T S
N AU P E U B AU STUE-FE Z Y K Q V Z AD F WECK-FE
Fig. 5-1 Example of the first screen form page "OUTPUT ISTACK": control bits
You can display the control bits in all modes. You can, for example,
make sure that organization block OB 2 is loaded and that interrupt
control program execution is possible at any time.
The control bits in the following table indicate errors that can occur in
the RESTART (e.g. during an initial COLD RESTART) and RUN
(e.g. during time-driven program execution) modes.
If several errors occur, all causes of interruptions that have occurred
up to now (and have not yet been processed) are displayed in the last
three lines of the control bits. See also system data word RS 2, this
contains the ICMK (interrupt condition code group word, 16 bits), in
which all errors not yet processed are also entered (Section 8.3.5).
5.7.2
ISTACK Content If the CPU is in the stop state, you can display the content of the
ISTACK on the screen after the control bit display by pressing the
enter key. When the CPU goes into the STOP mode, the system
program enters all the information it needs in this ISTACK for a
warm restart.
You can use the entries in this ISTACK to see what kind of error
occurred and where it occurred in the program.
If the stop state was caused by a sin gle error, only one level of the
ISTACK information is displayed. With several errors, the
corresponding number of ISTACK levels are output (DEPTH 01,
DEPTH 02, etc.). At all levels, only one error is marked as the
CAUSE OF INTERRUPT.
INTERRUPT STACK
DEPTH 02
ACCU1: 0000 C464 ACCU2: 0000 00FF ACCU3: 0000 0000 ACCU4: 0000 0000
DEPTH Information level of the ISTACK when more than one error has
occurred:
Information about the error The following table contains information about the ISTACK IDs with
which the statement in the user program can be found which caused
the CPU to change to the STOP mode.
5
Table 5-6 Meaning of the ISTACK IDs concerning the point of error
ISTACK ID Meaning
ISTACK ID Meaning
ISTACK ID Meaning
ISTACK ID Meaning
Cause of interrupt The following abbreviations (ISTACK IDs) represent the most
important causes of interruptions.
Table 5-7 causes
The only ISTACK IDs cause of interrupt
of interruptions that are marked are those that have
occurred in the currently displayed program processing level (see
LEVEL).
The causes of interruptions represent the contents of the interrupt
condition code group word (ICMK, 16 bits, see Section 8.3.5). Some
of the entries here are identical to those in the control bits.
Cause of interrupt
Cause of interrupt
Cause of interrupt
5.7.3
Example of Error Diagnosis
using the ISTACK
Example 1:
Fig. 5-3 illustrates the structure of the ISTACK in conjunction with the
interruptions that have occurred.
Depth 01
Level: 003C
ADF OB25
STP
x
Depth 02
Level: 0024
PROCESS OB2
INTERRUPT ADF
x
Depth 03
Level: 0010
TIME OB13
INTERRUPT
Depth 04
Level: 0004
CYCLE OB1
Before the CPU finally goes into the stop mode, a total of four
different program processing levels have been interrupted. If you
display the ISTACK, you obtain a four level ISTACK, first the ISTACK
with depth 01, in which the identifier of the program processing level
last interrupted (=ADF) is marked. You can now "page down" through the
ISTACK until you reach the ISTACK with depth 04, that represents the
CYCLE program processing level, that was interrupted first.
Example 2:
In this example the CPU detects an addressing error when executing the
"A I x.y" operation in OB 1. This leads to the processing of OB 25. As a
result of an STP operation in PB 5, the CPU goes into the STOP mode (see
Fig. 5-4).
OB 25 PB 5
0100 1000
0105
JU PB 5
0106 1007
STP
ADF
OB 1
0010
ADF C DB 16
001A
A Ix.y
CYCLE
Continuation 1 of Example 2:
INTERRUPT STACK
DEPTH 01
ACCU1:
5
CONDITION CODE:...
CAUSE OF INTERR.:
STP
X
Continuation 2 of Example 2:
INTERRUPT STACK
DEPTH 02
ACCU1:
CONDITION CODE:...
CAUSE OF INTERR.:
ADF
X