Siemens SIMATIC S5-95F Manual page 400

Table of Contents

Advertisement

S5-95F
Example:
You have written a user program consisting of OB1, PB0 and PB7, but you
programmed an illegal statement in PB7.
OB1
0000
000A
JU PB0
xxxx
xxxx
BE
Figure 14-4. Structured Program with Illegal Statement
When it encounters an illegal statement, the S5-95F interrupts the program scan and goes to
"STOP" with error "NNN".
The STEP address counter is set to the absolute address of next statement in program memory.
The REL SAC is set to the relative address of the next statement in PB7 (000E
Program Errors Occurring During Program Scanning
If errors occur during program scanning without the programmer's STATUS function having been
used, the STEP address counter is set to the start address of the errored block .
The relative address counter (REL-SAC) is set to "0000
possible.
For runtime errors such as "SUF" and "TRAF", however, you can ascertain the exact error address
in a somewhat roundabout way.
To do so, proceed as follows:
Set the S5-95F to "STOP".
On the programmer, invoke the "STATUS" function for the errored block.
Switch the S5-95F from "STOP" to "RUN".
When the S5-95F has once again gone to "STOP", display the ISTACK again on the
programmer screen.
The STEP address counter now shows the absolute memory address, and the relative STEP
address counter (REL-SAC) shows the relative address within the block preceding the address at
which the S5-95F went to "STOP".
EWA 4NEB 812 6210-02
Testing the User Program and Storing It on the Memory Submodule
PB0
0000
003F
JU PB7
xxxx
xxxx
BE
PB7
0000
000A
Illegal
000C
statement
000E
BE
).
H
". A more precise error location is not
H
14-11

Advertisement

Table of Contents
loading

Table of Contents