Siemens Simatic S7-300 CPU 31xC and CPU 31x S7-300 User Manual
Page 70
Memory concept
4.1 Memory areas and retentivity
CPU 31xC and CPU 31x, Technical data
4-8
Manual, Edition 08/2004, A5E00105475-05
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.
Caution
All temporary variables (TEMP) of an OB and its nested blocks are stored in local data.
When using complex nesting levels for block processing, you may cause an overflow in the
local data area.
The CPUs will change to STOP mode if you exceed the permissible length of local data for a
priority class.
Make allowances for local data space required for synchronous error OBs. This is assigned
to the respective triggering priority class.
See also
Retentivity of the load memory, system memory and RAM (Page 4-2)