Integer Data Types; Floating-Point Real Data Types - Siemens S7-1200 System Manual

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

Advertisement

PLC concepts
4.4 Data types
Data
Bit
Number
type
size
type
Octal
Hexadecimal
4.4.2

Integer data types

Table 4- 27
Integer data types (U = unsigned, S = short, D= double)
Data type
Bit size
USInt
8
SInt
8
UInt
16
Int
16
UDInt
32
DInt
32
4.4.3

Floating-point real data types

Real (or floating-point) numbers are represented as 32-bit single-precision numbers (Real),
or 64-bit double-precision numbers (LReal) as described in the ANSI/IEEE 754-1985
standard. Single-precision floating-point numbers are accurate up to 6 significant digits and
double-precision floating point numbers are accurate up to 15 significant digits. You can
specify a maximum of 6 significant digits (Real) or 15 (LReal) when entering a floating-point
constant to maintain precision.
Table 4- 28
Floating-point real data types (L=Long)
Data type Bit size Number range
Real
32
-3.402823e+38 to -1.175 495e-38,
±0,
+1.175 495e-38 to +3.402823e+38
LReal
64
-1.7976931348623158e+308 to
-2.2250738585072014e-308,
±0,
+2.2250738585072014e-308 to
+1.7976931348623158e+308
112
Number
range
8#0 to 8#37777777777
DW#16#0000_0000 to
DW#16#FFFF_FFFF,
16#0000_0000 to
16#FFFF_FFFF
Number Range
Constant examples
0 to 255
78, 2#01001110
-128 to 127
+50, 16#50
0 to 65,535
65295, 0
-32,768 to 32,767
30000, +30000
0 to 4,294,967,295
4042322160
-2,147,483,648 to
-2131754992
2,147,483,647
Constant
examples
8#74177417
DW#16#F0FF0F,
16#F0FF0F
Address
examples
MB0, DB1.DBB4,
Tag_name
MW2, DB1.DBW2,
Tag_name
MD6, DB1.DBD8,
Tag_name
Constant Examples
123.456, -3.4, 1.0e-5
12345.123456789e40,
1.2E+40
System Manual, 03/2014, A5E02486680-AG
Address
examples
Address examples
MD100, DB1.DBD8,
Tag_name
DB_name.var_name
Rules:
No direct addressing
support
Can be assigned in an OB,
FB, or FC block interface
table
S7-1200 Programmable controller

Advertisement

Table of Contents
loading

Table of Contents