Data Storage, Memory Areas, I/O And Addressing; Accessing The Data Of The S7-1200 - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
4.2

Data storage, memory areas, I/O and addressing

4.2.1

Accessing the data of the S7-1200

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
● PLC tag table: You can enter symbolic names in the STEP 7 PLC tag table for specific
● Data block (DB): You can include DBs in your user program to store data for the code
● Temp memory: Whenever a code block is called, the operating system of the CPU
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").
Table 4- 18
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
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
inputs (I), outputs (Q) and bit memory (M). This memory is accessible by all code blocks
without restriction.
memory locations. These tags are global to the STEP 7 program and allow programming
with names that are meaningful for your application.
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.
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.
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
4.2 Data storage, memory areas, I/O and addressing
PLC concepts
Force
Retentive
No
No
Yes
No
No
No
Yes
No
No
Yes
(optional)
105
Table of Contents
loading

Table of Contents