4-11
S7-200 Programmable Controller, CPU 210
C79000-G7076-C235-01
4.5
Understanding the Addresses of the Memory Areas
The CPU 210 provides 4 digital input points and 4 digital output points. In addition to the I/O,
the CPU provides memory areas for storing information. These memory locations have
unique addresses that can be accessed by your program. Figure 4-10 shows the memory
areas and the range of addresses for the CPU 210.
I0.0
Q0.0
I0.1
Q0.1
I0.2
Q0.2
I0.3
Q0.3
M0.0 to M0.7
M1.0 to M1.7
M2.0 to M2.7
M3.0 to M3.7
M4.0 to M4.7
M5.0 to M5.7
T0
T1
T2
T3
SM0.0 to SM0.7
SM1.0 to SM1.7
SMW2
Bit Memory Area
Timers
Special Memory
Analog Adjustment
Inputs and Outputs
C0
C1
C2
C3
Counters
Internal Memory
Figure 4-10 Memory Addresses for the CPU 210
Accessing the data in words (16-bit units) allows the following ranges of integer values:
S
Unsigned Integer:
0 to 65,535 (decimal)
0 to FFFF (hexadecimal)
S
Signed Integer:
-32,768 to +32,767 (decimal)
8000 to 7FFF (hexadecimal)
Using the Memory Address to Access Data
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. Figure 4-11 shows an example of addressing
a bit (which is also called “byte.bit” addressing). In this 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).
M
3
4
7 6 5 4 3 2 1 0
MSB
LSB
M 0
M 1
M 2
M 3
M 4
M 5
MSB = most significant bit,and LSB = least significant bit
.
Area identifier (
M
= bit memory area)
Byte address: byte 3 (the fourth byte)
Period separates the byte address
from the bit number
Bit of byte, or bit number: bit 4 of 8 (0 to 7)
Figure 4-11 Accessing a Bit of Data in the CPU Memory (Byte.Bit Addressing)
Basic Concepts for Programming the CPU 210
Содержание Simatic S7-200 CPU 210
Страница 10: ...x S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Contents ...
Страница 68: ...3 28 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Getting Started with a Sample Program ...
Страница 116: ...A 16 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 CPU 210 Data Sheets ...
Страница 126: ...F 2 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 CPU 210 Order Numbers ...
Страница 138: ...Index 12 S7 200 Programmable Controller CPU 210 C79000 G7076 C235 01 Index ...