Basics
41
1.4.1.2 INT
Variable values of the data type INTEGER are natural numbers without decimal places. The range of values for
INTEGER values is from -32768 to 32767.
The default initial value of a variable of this data type is 0.
Numbers can be entered in decimal, hexadecimal or binary format.
Decimal number Hexadecimal number Binary number
1234 16#4D2 2#10011010010
-1234 16#FB2E 2#1111101100101110
1.4.1.3 UINT
Variable values of the data type unsigned INTEGER are numerical numbers without decimal places. The range
of values for UINT values is from 0–65535.
1.4.1.4 DINT
Variable values of the data type DOUBLE INTEGER are natural numbers without decimal places. The value
range for a DOUBLE INTEGER values is from -2147483648 to 2147483647.
The default initial value of a variable of this data type is 0.
Numbers can be entered in decimal, hexadecimal or binary format.
Decimal number Hexadecimal number Binary number
123456789 16#75BCD15 2#111010110111100110100010101
-123456789 16#F8A432EB 2#1111100010100100001100101110
1.4.1.5 UDINT
Variable values of the data type unsigned DOUBLE INTEGER are numerical numbers without decimal places.
The value range for UDINT values is from 0–4294967295.
1.4.1.6 REAL
Variables of the data type REAL are real 32 bit numbers based on IEEE754. The mantissa is 23 bits and the
exponent is 8 bits.
31 30 29 23 22 16
... ...
14 13 12 3 2 1 015
...
Bit position
Exponents (8-bit)
Mantissa (23-bit)
0 positive
1 negative
Sign bit:
The value range for REAL values is between -3.402823466*E38 to -1.175494351*E-38, 0.0,
+1.175494351*E-38 to +3.402823466*E38.
The default for the initial value, e.g. for the variable declaration in the POU header or in the global variable list =
0.0