EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PLC concepts
5.4 Data types
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
127
5.4.2
Integer data types
Table 5- 30 Integer data types (U = unsigned, S = short, D= double)
Data
type
Bit size
Number Range
Constant examples
Address
examples
USInt
8
0 to 255
78, 2#01001110
MB0, DB1.DBB4,
Tag_name
SInt 8 -128 to 127 +50, 16#50
UInt
16
0 to 65,535
65295, 0
MW2, DB1.DBW2,
Tag_name
Int
16
-32,768 to 32,767
30000, +30000
UDInt
32
0 to 4,294,967,295
4042322160
MD6, DB1.DBD8,
Tag_name
DInt
32
-2,147,483,648 to 2,147,483,647
-2131754992
5.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 5- 31 Floating-point real data types (L=Long)
Data
type
Bit size
Number range
Constant Examples
Address examples
Real 32 -3.402823e+38 to -1.175 495e-38,
±0,
+1.175 495e-38 to
+3.402823e+38
123.456, -3.4, 1.0e-5 MD100,
DB1.DBD8,
Tag_name
LReal 64 -1.7976931348623158e+308 to
-2.2250738585072014e-308,
±0,
+2.2250738585072014e-308 to
+1.7976931348623158e+308
12345.123456789e40,
1.2E+40
DB_name.var_nam
e
Rules:
No direct ad-
dressing sup-
port
Can be as-
signed in an
OB, FB, or FC
block interface
table
Calculations that involve a long series of values including very large and very small numbers
can produce inaccurate results. This can occur if the numbers differ by 10 to the power of x,
where x > 6 (Real), or 15 (LReal). For example (Real): 100 000 000 + 1 = 100 000 000.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals