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

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

Advertisement

Converting double-precision real type to word (signed), double
word (signed) type
LREAL_TO_INT(_E), LREAL_TO_DINT(_E)
High
Basic
Process
performance
Structured ladder/FBD
LREAL_TO_INT_E
EN
ENO
s
The following function(s) can go in the dotted squares.
LREAL_TO_INT, LREAL_TO_INT_E, LREAL_TO_DINT, LREAL_TO_DINT_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• LREAL_TO_INT, LREAL_TO_INT_E
Converts double-precision real type data input to (s) into word (signed) type data, and outputs the operation result from (d).
s
1234.0
Double-precision real type
The value to be input to (s) is double-precision real type data, within the range from -32768 to 32767.
The converted data is the value rounded double-precision real type data to the first digit after the decimal point.
• LREAL_TO_DINT, LREAL_TO_DINT_E
Converts double-precision real type data input to (s) into double word (signed) type data, and outputs the operation result from
(d).
s
16543521.0
Double -precision real type
The value to be input to (s) is double-precision real type data within the range from -2147483648 to 2147483647. However,
rounding error may occur when setting the input value by programming tool. For precautions when setting an input value
using a programming tool, refer to the following.
 MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
The converted data is the value rounded double-precision real type data to the first digit after the decimal point.
5 APPLICATION FUNCTIONS
56
5.1 Type Conversion Functions
LCPU
Redundant
Universal
ST
ENO:=
LREAL_TO_INT_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s(_LREAL)
Input
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
Word (signed) type
Double word (signed) type
(EN, s, d);
d
1234
d
16543521
Data type
Bit
Double-precision real
Bit
Word (signed), double word (signed)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents