97BPLC concepts
4.4 Data types
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
87
Table 4- 15 Size and range of the BCD format
Format
Size (bits)
Numeric Range
Constant Entry Examples
BCD16
16
-999 to 999
123, -123
BCD32
32
-9999999 to 9999999
1234567, -1234567
4.4.1
Bool, Byte, Word, and DWord data types
Table 4- 16 Bit and bit sequence data types
Data
type
Bit
size
Number
type
Number
range
Constant
examples
Address
examples
Boolean
FALSE or TRUE
TRUE, 1,
Binary
0 or 1
0, 2#0
Octal
8#0 or 8#1
8#1
Bool
1
Hexadecimal
16#0 or 16#1
16#1
I1.0
Q0.1
M50.7
DB1.DBX2.3
Tag_name
Binary
2#0 to 2#11111111
2#00001111
Unsigned integer
0 to 255
15
Octal
8#0 to 8#377
8#17
Byte
8
Hexadecimal
B#16#0 to B#16#FF
B#16#F, 16#F
IB2
MB10
DB1.DBB4
Tag_name
Binary
2#0 to 2#1111111111111111
2#1111000011110000
Unsigned integer
0 to 65535
61680
Octal
8#0 to 8#177777
8#170360
Word
16
Hexadecimal
W#16#0 to W#16#FFFF,
16#0 to 16#FFFF
W#16#F0F0, 16#F0F0
MW10
DB1.DBW2
Tag_name
Binary
2#0 to
2#111111111111111111111111
11111111
2#111100001111111100
001111
Unsigned integer
0 to 4294967295
15793935
Octal
8#0 to 8#37777777777
8#74177417
DWord
32
Hexadecimal
DW#16#0000_0000 to
DW#16#FFFF_FFFF,
16#0000_0000 to
16#FFFF_FFFF
DW#16#F0FF0F,
16#F0FF0F
MD10
DB1.DBD8
Tag_name