Program Trace With The Block Stack ("Bstack") Function; (Not Possible On The Pg 605U Programmer) - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

S5-115U Manual
5.2.2

Program Trace with the Block Stack ("BSTACK") Function

(not possible on the PG 605U programmer)

During program scanning, jump operations enter the following information in the block stack:
the data block that was valid before program scanning exited a block;
the relative return address. This address indicates the location at which program scanning
continues after it returns from the block that was called.
the absolute return address. This address indicates the location in the program memory at
which program scanning continues after it returns from the block that was called.
You can call the information listed above using the "BSTACK" programmer function in the
"STOP" mode if the CPU has entered this mode as the result of a malfunction. The "BSTACK"
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 access. DB5 is
two words long. DB3 is ten words long).
You can use the "BSTACK" function to determine the path used to reach FB2 and to
determine which block has passed the wrong parameter. The "BSTACK" contains the
three return addresses (as marked in Figure 5-4).
OB 1
00 JU PB 1
02
04 JU PB 2
06
08 JC PB 3
10
xx
BE
Figure 5-4. Program Trace with the "BSTACK" Function
EWA 4NEB 811 6130-02b
PB 1
00
xx
BE
PB 4
PB 2
00
00 C DB5
02 JU PB4
08 JC FB2
04
10
xx
BE
xx
BE
PB 3
00 C DB3
16 JU FB 2
18
BE
Error Diagnostics
Interruption
with the "TRAF"
error message
FB 2
00
2A
L DW4
xx
BE
5-15

Advertisement

Table of Contents
loading

Table of Contents