Accessing Data - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

PLC concepts

4.2 Accessing data

4.2
Accessing data
The CPU stores information in different memory locations that have unique addresses. You
can explicitly identify the memory address that you want to access. This allows your program
to have direct access to the information. To access a bit in a memory area, you specify the
address, which includes the memory area identifier, the byte address, and the bit number
(which is also called "byte.bit" addressing).
Table 4- 2
Elements of a bit address
In this example, the memory area and byte address ("M3") designates byte 3 of M memory,
with a period (".") to separate the bit address (bit 4).
You can access data in most memory areas (V, I, Q, M, S, L, and SM) as bytes, words, or
double words by using the byte-address format. To access a byte, word, or double word of
data in the memory, you must specify the address in a way similar to specifying the address
for a bit. This includes an area identifier, data size designation, and the starting byte address
of the byte, word, or double-word value, as shown in the following figure.
74
Bit addressing
Description
A
Memory area identifier
B
Byte address: byte 3
C
Separator ("byte.bit")
D
Bit location of the byte (bit 4 of 8, bits numbered 7 to 0)
E
Bytes of the memory area
F
Bits of the selected byte
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents