[R_DI] Conversion real to double integer
Function block R_DI converts a real input to the next double integer value and issues it at the output.
R_DI converts a real input to the next double integer value and issues it at the output.
R_DI converts the input [In] to the next double integer value and issues it at the output [Out]. Rounding applies the following concept:
Positive input values:
- Round to the next higher integer value if value after comma ≥ 0.5.
- Round to the next lower integer value if value after comma <= 0.5.
Negative input values
- Round to the next higher integer value if value after comma ≤ 0.5.
- Round to the next lower integer value if value after comma > 0.5.
In | Out |
|---|---|
> 2 147 483 647 1 | 2 147 483 647 |
2 147 483 647 1 | 2 147 483 647 |
10.0 | 10 |
9.5 | 10 |
9.499 | 9 |
-10.0 | -10 |
- 9.501 | -10 |
- 9.4 | - 9 |
-2 147 483 648 1 | -2 147 483 648 |
< -2 147 483 648 1 | -2 147 483 648 |
1 Inaccuracies in calculation within the framework of resolution for real values is ca. +/- 128.
If the input value [In] is above the highest possible double integer value (2147483647) or below the lowest possible double integer value (-2147483648), it can no longer be displayed as a double integer value. For this reason, the highest possible or lowest possible double integer value is output at [Out].

Resolution of real values (24 bit => 8 digits) is limited. Thus, values from 16 000 000 cannot be displayed accurately.