Error Diagnostics
5.2.1
Determining an Error Address
The STEP address counter (SAZ) in the ISTACK (bytes 25 and 26) indicates the absolute memory
address of the STEP 5 statement in the PLC before which the CPU went into the "STOP" mode.
You can use the "DIR PC" programmer function to determine the appropriate block start address.
Example:
Figure 5-1 shows a program consisting of OB1, PB0, and PB7. PB7 contains an illegal statement.
OB1
JU PB0
BE
Figure 5-1. Structured Program with Illegal Statement
When the CPU reaches the illegal statement, it interrupts program scanning and goes into the
"STOP" mode with the "NNN" error message. The STEP address counter is at the absolute address
of the next statement in the program memory that still has not been processed (see Figure 5-2).
5-12
PB0
JU PB7
BE
BE
S5-115U Manual
PB7
Illegal
statement
EWA 4NEB 811 6130-02b