Bool, Byte, Word, And Dword Data Types - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

● Floating-point Real (Page 112): Real (32-bit Real or floating-point value), LReal (64-bit
● Time and Date (Page 113): Time (32-bit IEC time value), Date (16-bit date value), TOD
● Character and String (Page 114): Char (8-bit single character), String (variable-length
● Array (Page 116)
● Data structure (Page 117): Struct
● PLC Data type (Page 117)
● Pointers (Page 118): Pointer, Any, Variant
Although not available as data types, the following BCD numeric format is supported by the
conversion instructions.
Table 4- 25
Format
BCD16
BCD32
4.4.1

Bool, Byte, Word, and DWord data types

Table 4- 26
Bit and bit sequence data types
Data
Bit
Number
type
size
type
Bool
1
Boolean
Binary
Octal
Hexadecimal
Byte
8
Binary
Unsigned integer
Octal
Hexadecimal
Word
16
Binary
Unsigned integer
Octal
Hexadecimal
DWord
32
Binary
Unsigned integer
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Real or floating-point value)
(32-bit time-of-day value), DTL (12-byte date-and-time structure)
string of up to 254 characters)
Size and range of the BCD format
Size (bits)
Numeric Range
16
-999 to 999
32
-9999999 to 9999999
Number
range
FALSE or TRUE
0 or 1
8#0 or 8#1
16#0 or 16#1
2#0 to 2#11111111
0 to 255
8#0 to 8#377
B#16#0 to B#16#FF
2#0 to 2#1111111111111111
0 to 65535
8#0 to 8#177777
W#16#0 to W#16#FFFF,
16#0 to 16#FFFF
2#0 to
2#111111111111111111111111
11111111
0 to 4294967295
Constant Entry Examples
123, -123
1234567, -1234567
Constant
examples
TRUE, 1,
0, 2#0
8#1
16#1
2#00001111
15
8#17
B#16#F, 16#F
2#1111000011110000
61680
8#170360
W#16#F0F0, 16#F0F0
2#111100001111111100
001111
15793935
PLC concepts
4.4 Data types
Address
examples
I1.0
Q0.1
M50.7
DB1.DBX2.3
Tag_name
IB2
MB10
DB1.DBB4
Tag_name
MW10
DB1.DBW2
Tag_name
MD10
DB1.DBD8
Tag_name
111

Advertisement

Table of Contents
loading

Table of Contents