Real_To_Dint(_E) - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)

5.1.24 REAL_TO_DINT(_E)

Outline
This function converts float (single precision) data into double word [signed] data, and outputs the data
obtained by conversion.
1. Format
Function name
REAL_TO_DINT
REAL_TO_DINT_
E
*1.
Output variable
2. Set data
Variable
EN
Input
variable
a_real (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts float (single precision) data stored in a device specified in
[signed] data, and outputs the data obtained by conversion to a device specified in
16543521.0
FLOAT (single precision) data
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling 32-bit data in structured programs, you cannot specify 16-bit devices directly, different
from simple projects. Use labels when handling 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
3) The function is provided in the FX
4) In the data obtained by conversion, the portion after the decimal point of the float (single precision) data
(source data) is rounded off.
82
FX
3U(C)
Expression in each language
Structured ladder
REAL_TO_DINT
Label 1
a_real
X000
REAL_TO_DINT_E
EN
ENO
Label 1
a_real
Execution condition
Conversion source float (single precision) data
)
s
Execution status
Double word [signed] data after conversion
(
)
d
16543521
Double word [signed] data
The portion after the decimal
point is rounded off.
Series Ver.1.10 or later.
3G
FX
FX
FX
3G
2N(C)
1N(C)
REAL_TO_DINT(a_real);
Example:
Label 2:=
*1
Label 2
REAL_TO_DINT(Label 1);
REAL_TO_DINT_E(EN,a_real,
Output label);
Example:
REAL_TO_DINT_E(X000, Label 1,
*1
Label 2
Label 2);
Description
5 Applied Functions
5.1 Type Conversion Functions
FX
FX
/FX
FX
1S
U
2C
0N
ST
Data type
Bit
FLOAT (Single Precision)
Bit
Double Word [signed]
into double word
s
.
d
FX
0(S)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents