Mitsubishi Electric MELSEC Q Series Programming Manual page 194

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

Advertisement

6 IEC FUNCTIONS
6.1.5 Double precision integer type (DINT)
Double precision integer type (DINT) data is converted into integer type (INT) data.
Function definition
Function definition
6 - 7
INT DINT_TO_INT ( DINT S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
INT
Conversion result (BIN 16-bit data)
Remarks: The lower 16 bits of the data to be converted (BIN 32-bit data) is stored in
the return value.
The upper 16 bits are discarded.
Example of use
Argument Type
DINT
i_data1 :=
DINT_TO_INT(di_data1);
BOOL DINT_TO_INT_E( BOOL EN, DINT S1, INT 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 double precision integer type
(*
(DINT) data in dData is converted into integer type (INT) data, and the result
(*
is stored into Result.
M0 := DINT_TO _INT_E ( X0, dData, Result ) ;
integer type (INT) conversion
Data to be converted (BIN 32-bit data)
ST Program
Conversion Result
LD
MOV
Execution condition (Function is executed only when the result is TRUE)
Data to be converted (BIN 32-bit data)
Conversion result (BIN 16-bit data)
DINT_TO_INT
DINT_TO_INT_E
Description
Description
Used Instruction
SM400
LD,MOV
di_data1
i_data1
Description
Description
*)
*)
*)
6 - 7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents