6 - 8 6 - 8
6 IEC FUNCTIONS
6.1.6 Double precision integer type (DINT) real number type (REAL) conversion DINT_TO_REAL
DINT_TO_REAL_E
Double precision integer type (DINT) data is converted into real number type (REAL) data.
Function definition
REAL DINT_TO_REAL ( DINT S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data to be converted (BIN 32-bit data)
Return value
Return Value
Description
REAL
Conversion result (real number data)
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
DINT
r_data1 :=
DINT_TO_REAL(di_data1);
LD SM400
DFLT di_data1
r_data1
LD,DFLT
Function definition
BOOL DINT_TO_REAL_E( BOOL EN, DINT S1, REAL D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Data to be converted (BIN 32-bit data)
D1
OUT
Conversion result (real number data)
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
(*
When execution condition X0 turns ON, the double precision integer type
(DINT) data in dData is converted into real number type (REAL) data, and the
result is stored into Result.
M0 := DINT_TO _REAL_E ( X0, dData, Result ) ;
*)
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......