Addressing Memory Areas - Siemens SIMATIC S7-1200 Manual

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

PLC concepts made easy
4.4 Memory areas, addressing and data types
4.4.2

Addressing memory areas

STEP 7 facilitates symbolic programming. You create symbolic names or "tags" for the
addresses of the data, whether as PLC tags relating to memory addresses and I/O points or
as local variables used within a code block. To use these tags in your user program, simply
enter the tag name for the instruction parameter. For a better understanding of how the CPU
structures and addresses the memory areas, the following paragraphs explain the "absolute"
addressing that is referenced by the PLC tags. The CPU provides several options for storing
data during the execution of the user program:
● Global memory: The CPU provides a variety of specialized memory areas, including
inputs (I), outputs (Q) and bit memory (M). This memory is accessible by all code blocks
without restriction.
● Data block (DB): You can include DBs in your user program to store data for the code
blocks. The data stored persists when the execution of the associated code block comes
to an end. A "global" DB stores data that can be used by all code blocks, while an
instance DB stores data for a specific FB and is structured by the parameters for the FB.
● Temp memory: Whenever a code block is called, the operating system of the CPU
allocates the temporary, or local, memory (L) to be used during the execution of the
block. When the execution of the code block finishes, the CPU reallocates the local
memory for the execution of other code blocks.
Each different memory location has a unique address. Your user program uses these
addresses to access the information in the memory location.
References to the input (I) or output (Q) memory areas, such as I0.3 or Q1.7, access the
process image. To immediately access the physical input or output, append the reference
with ":P" (such as I0.3:P, Q1.7:P, or "Stop:P").
Forcing applies a fixed value to a physical input (Ix.y:P) or a physical output (Qx.y:P) only.
To force an input or output, append a ":P" to the PLC tag or the address. For more
information, see "Forcing variables in the CPU" (Page 261).
Table 4- 4
Memory areas
Memory area
I
Process image input
I_:P
1
(Physical input)
Q
Process image output
Q_:P
1
(Physical output)
M
Bit memory
L
Temp memory
DB
Data block
To immediately access (or to force) the physical inputs and physical outputs, append a ":P" to the address or tag (such
1
as I0.3:P, Q1.7:P, or "Stop:P").
62
Description
Copied from physical inputs at the beginning of the scan
cycle
Immediate read of the physical input points on the CPU,
SB, and SM
Copied to physical outputs at the beginning of the scan
cycle
Immediate write to the physical output points on the
CPU, SB, and SM
Control and data memory
Temporary data for a block local to that block
Data memory and also parameter memory for FBs
Force
Retentive
No
No
Yes
No
No
No
Yes
No
No
Yes
(optional)
No
No
No
Yes
(optional)
Easy Book
Manual, 03/2014, A5E02486774-AF

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents