Siemens S7-1200 System Manual page 106

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

Advertisement

PLC concepts
4.2 Data storage, memory areas, I/O and addressing
Memory area
L
Temp memory
DB
Data block
To immediately access (read or write) the physical inputs and physical outputs, append a ":P" to the address or tag
1
(such as I0.3:P, Q1.7:P, or "Stop:P").
Each different memory location has a unique address. Your user program uses these
addresses to access the information in the memory location. The absolute address consists
of the following elements:
● Memory area identifier (such as I, Q, or M)
● Size of the data to be accessed ("B' for Byte, "W" for Word, or "D" for DWord)
● Starting address of the data (such as byte 3 or word 3)
When accessing a bit in the address for a Boolean value, you do not enter a mnemonic for
the size. You enter only the memory area, the byte location, and the bit location for the data
(such as I0.0, Q0.1, or M3.4).
A
B
C
D
In the example, the memory area and byte address (M = bit memory area, and 3 = Byte 3)
are followed by a period (".") to separate the bit address (bit 4).
Accessing the data in the memory areas of the CPU
STEP 7 facilitates symbolic programming. Typically, tags are created either in PLC tags, a
data block, or in the interface at the top of an OB, FC, or FB. These tags include a name,
data type, offset, and comment. Additionally, in a data block, a start value can be specified.
You can use these tags when programming by entering the tag name at the instruction
parameter. Optionally you can enter the absolute operand (memory area, size and offset) at
the instruction parameter. The examples in the following sections show how to enter
absolute operands. The % character is inserted automatically in front of the absolute
operand by the program editor. You can toggle the view in the program editor to one of
these: symbolic, symbolic and absolute, or absolute.
106
Description
Temporary data for a block local to that block
Data memory and also parameter memory for FBs
Memory area identifier
Byte address: byte 3
Separator ("byte.bit")
Bit location of the byte (bit 4 of 8)
Force
No
No
E
Bytes of the memory area
F
Bits of the selected byte
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Retentive
No
Yes
(optional)

Advertisement

Table of Contents
loading

Table of Contents