Converting Word (Signed), Double Word (Signed) Type To Single-Precision Real Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Converting word (signed), double word (signed) type to single-
precision real type
INT_TO_REAL(_E), DINT_TO_REAL(_E)
High
Basic
Process
performance
Structured ladder/FBD
INT_TO_REAL_E
EN
ENO
s
The following function(s) can go in the dotted squares.
INT_TO_REAL, INT_TO_REAL_E, DINT_TO_REAL, DINT_TO_REAL_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• INT_TO_REAL, INT_TO_REAL_E
Converts word (signed) type data input to (s) into single-precision real type data, and outputs the operation result from (d).
s
1234
Word (signed) type
• DINT_TO_REAL, DINT_TO_REAL_E
Converts double word (signed) type data input to (s) into single-precision real type data, and outputs the operation result from
(d).
s
16543521
Double word (signed) type
The number of significant figures of single-precision real type data is approximately 7 since the data is processed in 32-bit
single precision. Accordingly, the converted data includes an error (rounding error) if an integer value is outside the range of -
16777216 to 16777215.
5 APPLICATION FUNCTIONS
38
5.1 Type Conversion Functions
Redundant Universal
LCPU
ST
ENO:=
INT_TO_REAL_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s(_INT, _DINT)
Input
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
Single-precision real type
Single-precision real type
(EN, s, d);
d
1234.0
d
16543521.0
Data type
Bit
Word (signed), double word (signed)
Bit
Single-precision real number

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents