Memory concept
6.1 Memory areas and retentive address areas
Process image update
The operating system updates the process image periodically. The figure below shows the
sequence of this operation within a cycle.
3,2
3,,
6&&%H6\
%RRW %RRWSURJUDP
:ULWHSURFHVVLPDJHRIRXWSXWVWRPRGXOHV
([HFXWHXVHUSURJUDP2%DQGDOOEORFNV
FDOOHGLQLW
5HDGLQSXWVIURPPRGXOHVDQGUHIUHVKGDWDLQ
SURFHVVLPDJHRILQSXWV
8VHU3URJUDP
&\FOHWLPH
Figure 6-2 Sequence of operation within a cycle
Local data
Local data store:
• the temporary variables of code blocks
• the start information of the OBs
• transfer parameters
• intermediate results
Temporary Variables
When you create blocks, you can declare temporary variables (TEMP) which are only
available during block execution and then overwritten again. These local data have fixed
length in each OB. Local data must be initialized prior to the first read access. Each OB also
requires 20 bytes of local data for its start information. Local data access is faster compared
to access to data in DBs.
The CPU is equipped with memory for storing temporary variables (local data) of currently
executed blocks. The size of this memory area depends on the CPU. It is distributed in
partitions of equal size to the priority classes. Each priority class has its own local data area.
S7-300 CPU Data: CPU 315T-2 DP
6-6 Manual, 12/2005, A5E00427933-02