Double Precision Integer Type (Dint) Boolean Type (Bool) 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.4 Double precision integer type (DINT)
Double precision integer type (DINT) data is converted into Boolean type (BOOL) data.
Function definition
Function definition
6 - 6
BOOL DINT_TO_BOOL ( DINT S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
BOOL
Conversion result (bit data)
Remarks: When the data to be converted (BIN 32-bit data) is 0, the return value is "0".
When the data to be converted (BIN 32-bit data) is other than 0, the return
value is "1".
Example of use
Argument Type
DINT
M100 :=
DINT_TO_BOOL(di_data1);
BOOL DINT_TO_BOOL _E( BOOL EN, DINT S1, BOOL 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 the Boolean type (BOOL), and the
(*
result is stored into Result.
M0 := DINT_TO _BOOL_E ( X0, dData, Result ) ;
Boolean type (BOOL) conversion DINT_TO_BOOL
Data to be converted (BIN 32-bit data)
ST Program
Conversion Result
LDD<>
OUT
Execution condition (Function is executed only when the result is TRUE)
Data to be converted (BIN 32-bit data)
Conversion result (bit data)
DINT_TO_BOOL_E
Description
Description
Used Instruction
di_data1 K0
LDD<>, OUT
M100
Description
Description
*)
*)
*)
6 - 6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents