Standard function blocks
360
REALn_TO_DINT_SIMP
(10028)
Illustration
Execution time 5.54 µs
Operation Output (O) is the 32-bit integer equivalent of the REAL/REAL24 input (I) multiplied by
the scale input (SCALE).
Error codes are indicated by the error output (ERRC) as follows:
Example (from REAL to DINT):
When I = 2.04998779297and SCALE = 100, O = 204.
Inputs The input data type is selected by the user.
Input (I): REAL, REAL24
Scale input (SCALE): DINT
Outputs Output (O): DINT
Error output (ERRC): DINT
REALn_TO_DINT_SIMP
(REAL) 92
TLA1 1 msec (1)
I
SCALE
O
O(92)
ERR C
ERRC(92)
Error code Description
0No error
1001 The calculated integer value exceeds the minimum value. The output
is set to the minimum value.
1002 The calculated integer value exceeds the maximum value. The
output is set to the maximum value.
1003 Scale input is 0. The output is set to 0.
1004 Incorrect scale input, i.e. scale input is < 0 or is not a factor of 10.