Tracing The Program With The "Bstack" Function - Siemens S5-100U User Manual

Simatic s5 programmable controller
Hide thumbs Also See for S5-100U:
Table of Contents

Advertisement

Diagnostics and Troubleshooting
5.3.2

Tracing the Program with the "BSTACK" Function

Program trace with "BSTACK" is not possible on the 605U programmer.
During program processing, the following information about jump operations is entered in the block
stack (BSTACK):
The data block that was valid before program processing exited a block.
The relative return address
- It specifies the address where program processing will continue after the return from the
called up block.
The absolute return
- It specifies the memory address in the program memory where program processing will
continue after the return.
You can call up this information with the "BSTACK" programmer function in the STOP operating
mode if a fault caused the CPU to go into the STOP operating mode. "BSTACK" then reports the
status of the block stack at the time the interruption occurred.
Example:
Program scanning was interrupted at function block FB2. The CPU went into the STOP mode with
the error message "TRAF" (because of incorrect DB access, e.g., DB5 is two words long and DB3
is ten words long).
"BSTACK" lets you determine the path used to reach FB2 and lets you know which DB was open
at the time of call up. "BSTACK" contains the three (marked) return addresses.
OB1
00 JU PB1
02
04 JU PB2
06
08 JC PB3
10
xx
BE
5-12
PB1
00
xx
BE
PB2
00 C DB5
02 JU PB4
04
xx
BE
PB3
00 C DB3
16 JU FB2
18
BE
Figure 5-6. Tracing the Program with "BSTACK"
PB4
00
08 JC FB2
10
xx
BE
S5-100U
Interrupt with the
"TRAF" error
message
FB2
00
2A
L DW4
xx
BE
EWA 4NEB 812 6120-02

Advertisement

Table of Contents
loading

Table of Contents