S7 Data Type |
Description |
Address Range |
Data Type |
x |
Bit |
X0. .b |
Boolean |
B BYTE USINT |
Unsigned Byte |
X0. b-X65534.b .b is Bit Number 0-7
B0.b-B65535.b BYTE0.b-BYTE65535.b .b is Bit Number 0-7 |
8-bit
Boolean |
C CHAR SINT |
Signed |
C0-C65535 CHAR0-CHAR65535
C0.b-C65535.b CHAR0.b-CHAR65535.b .b |
8-bit unsigned integer
Boolean |
W WORD UINT |
Unsigned double word |
W0-W65534 WORD0-WORD65534
W0.b-W65534.b WORD0.b-WORD65534.b .b is Bit Number 0-15 |
16-bit
Boolean |
I INT |
Signed |
I0-I65534 INT0-INT65534
I0.b-I65534.b INT0.b-INT65534.b .b |
16-bit signed integer
Boolean |
D DWORD UDINT |
Unsigned double word |
D0-D65532 DWORD0-DWORD65532
D0.b-D65532.b DWORD0.b- DWORD65532.b .b is Bit Number 0-31 |
32-bit
Boolean |
DI DINT |
Signed |
DI0-DI65532 DINT0-DINT65532
DI0.b-DI65532.b DINT0.b-DINT65532.b .b |
32-bit signed integer
Boolean |
R
REAL |
IEEE Float |
R0-R65532
REAL0-REAL65532 |
Float |
- Note: Be cautious while modifying WORD, INT, DWORD, and DINT types, as each address starts at a byte offset within the device. Therefore, words MW0 and MW1 overlap at byte 1. Writing to MW0 will also modify the value held in MW1. Similarly, DWORD and long types can also overlap. It is recommended that these memory types should be used in such way that overlapping does not occur. As an example, DWORD MD0, MD4, MD8 … etc. can be used to prevent bytes from overlapping.