R_INT_WORD: Type conversion (REAL -> INT -> WORD) (R_INT_WORD: Type conversion (REAL -> INT -> WORD))
Original instructions
Function description
This function converts an input value with data type REAL to data type INT and then data type WORD.
As opposed to the REAL_TO_WORD conversion module (standard library), the R_INT_WORD module performs a conversion to an INT value prior to output of the WORD value. The result is, for example, that the input value -1.0 is output as output value FFFF. (Not as with the REAL_TO_WORD module, for which in this case the output value 0 is set).
As additional parameters, EN and ENO are projected.
Representation in FBD
Representation:
Representation in LD
Appearance:
Representation in IL
Appearance:
LD RealValue 
R_INT_WORD 
ST WordValue
Representation in ST
Appearance:
WordValue := R_INT_WORD (RealValue);
Parameter description
Description of input parameters:
Parameter
Data type
Description
INP
Input value
Description of output parameters:
Parameter
Data type
Description
OUTP
Output value
Runtime error
The system bit %S18 and system words %SW17 (error status) and %SW125 (16#DE87: Caldulation errors in a floating point value calculation) are set when