Professional Documents
Culture Documents
Local Data Stack: Caution
Local Data Stack: Caution
Caution
When using temporary variables, remember that they are only valid within the
relevant block or are only available as previous local data for other blocks called in
this block. In particular, there is no guarantee that if you close and then re-open
the block, the temporary variables will have the same values they had when the
previous block call was completed. Temporary variables are by definition
undetermined when a block is called and must be re-initialized again when they
are used for the first time in the block.
All the temporary variables (TEMP) of an OB and its associated blocks are saved
in the L stack. If you use too many nesting levels when executing your blocks, the
L stack can overflow.
S7 CPUs change to STOP mode if the permitted L stack size for a program is
exceeded.
Test the L stack (the temporary variables) in your program.
The local data requirements of synchronous error OBs must be taken into
consideration.
mk:@MSITStore:C:\Program%20Files%20(x86)\Siemens\Step7\S7bin\s7bashdB.chm::/bas00... 21.06.2020
Local Data Stack Seite 2 von 2
400 CPUs and for the CPU 318. Any priority classes you do not required can be deselected. With S7-400
CPUs and the CPU 318 the memory area for other priority classes is then increased. Deactivated OBs are
ignored during program execution and save cycle time.
With the other S7-300 CPUs every priority class is assigned a fixed amount of local data (256 bytes) that
cannot be changed.
mk:@MSITStore:C:\Program%20Files%20(x86)\Siemens\Step7\S7bin\s7bashdB.chm::/bas00... 21.06.2020