Siemens CPU 31 Series Technical Data Manual page 75

Table of Contents

Advertisement

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 load memory, system memory and RAM (Page 4-2)
CPU 31xC and CPU 31x, Technical Data
Manual, 01/2006 Edition, A5E00105475-06
Memory concept
4.1 Memory areas and retentivity
4-7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents