Technical data
Appendix
27.2 Memory Areas of S7 CPUs
Programming with STEP 7
580 Manual, 05/2010, A5E02789666-01
27.2.3.3 Local Data Stack
The L stack saves the following:
• The temporary variables of the local data of blocks
• The start information of the organization blocks
• Information about transferring parameters
• Interim results of the logic in Ladder Logic programs
When you are programming organization blocks, you can declare temporary variables (TEMP) that
are only available when the block is executed and are then overwritten again. Before you access
the local data stack for the first time, the local data must be initialized. In addition to this, every
organization block also requires 20 bytes of local data for its start information.
The CPU has a limited amount of memory for the temporary variables (local data) of blocks
currently being executed. The size of this memory area, the local data stack, is dependent on the
CPU. The local data stack is divided up equally among the priority classes (default). This means
that every priority class has its own local data area, thus guaranteeing that higher priority classes
and their OBs also have space available for their local data.
The following figure shows the assignment of local data to the priority classes in an example in
which in the L stack OB1 is interrupted by OB10 which is then interrupted by OB81.