97BPLC concepts
4.2 Data storage, memory areas, I/O and addressing
S7-1200 Programmable controller
82
System Manual, 11/2011, A5E02486680-05
0
࿆ ࿇ ࿈ ࿉
࿊
࿋
A
Memory area identifier
E
Bytes of the memory area
B
Byte address: byte 3
F
Bits of the selected byte
C
Separator ("byte.bit")
D
Bit location of the byte (bit 4 of 8)
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.
I (process image input): The CPU samples the peripheral (physical) input points just prior to
the cyclic OB execution of each scan cycle and writes these values to the input process
image. You can access the input process image as bits, bytes, words, or double words. Both
read and write access is permitted, but typically, process image inputs are only read.
Table 4- 9
Absolute addressing for I memory
Bit
I[byte address].[bit address]
I0.1
Byte, Word, or Double Word
I[size][starting byte address]
IB4, IW5, or ID12
By appending a ":P" to the address, you can immediately read the digital and analog inputs
of the CPU, SB or SM. The difference between an access using I_:P instead of I is that the
data comes directly from the points being accessed rather than from the input process
image. This I_:P access is referred to as an "immediate read" access because the data is
retrieved immediately from the source instead of from a copy that was made the last time the
input process image was updated.
Because the physical input points receive their values directly from the field devices
connected to these points, writing to these points is prohibited. That is, I_:P accesses are
read-only, as opposed to I accesses which can be read or write.