6 - 6 6 - 6
6 IEC FUNCTIONS
6.1.4 Double precision integer type (DINT) Boolean type (BOOL) conversion DINT_TO_BOOL
DINT_TO_BOOL_E
Double precision integer type (DINT) data is converted into Boolean type (BOOL) data.
Function definition
BOOL DINT_TO_BOOL ( DINT S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Data to be converted (BIN 32-bit data)
Return value
Return Value
Description
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
ST Program
Conversion Result
Used Instruction
DINT M100
:=
DINT_TO_BOOL(di_data1);
LDD<> di_data1 K0
OUT M100
LDD<>, OUT
Function definition
BOOL DINT_TO_BOOL _E( BOOL EN, DINT S1, BOOL 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 (bit 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 the Boolean type (BOOL), and the
result is stored into Result.
M0 := DINT_TO _BOOL_E ( X0, dData, Result ) ;
*)
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......