Real Number Type (Real) Double Precision Integer Type (Dint) Conversion - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

6 IEC FUNCTIONS
6.1.12 Real number type (REAL) double precision integer type (DINT) conversion REAL_TO_DINT
The specified real number type (REAL) data is converted into double precision integer type (DINT) data.
Function definition
Function definition
6 - 14
DINT REAL_TO_DINT( REAL S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
DINT
Conversion result (BIN 32-bit data)
Example of use
Argument Type
REAL
w_DWord1:=
REAL_TO_DINT(w_Real1);
BOOL REAL_TO_DINT_E( BOOL EN, REAL S1, DINT D1 );
Argument
Argument Name
IN/OUT
EN
IN
S1
IN
D1
OUT
Return value
Return Value
BOOL
Execution condition
Example of use
(*
When execution condition X0 turns ON, the real number type (REAL) data in
(*
rData is converted into double precision integer type (DINT) data, and the
(*
result is stored into Result.
M0 := REAL_TO_DINT_E( X0, rData, Result ) ;
Data to be converted (real number data)
ST Program
Conversion Result
LD
DINT
Execution condition (Function is executed only when the result is TRUE)
Data to be converted (real number data)
Conversion result (BIN 32-bit data)
REAL_TO_DINT_E
Description
Description
Used Instruction
SM400
LD,DINT
w_Real1
w_DWord1
Description
Description
*)
*)
*)
6 - 14

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents