5 MELSEC FUNCTIONS
5.10 Logical Operation Commands
5.10.1 Logical product (2 devices)
The specified two BIN 16-bit data are ANDed bit by bit.
Function definition
5.10.2 Logical product (3 devices)
The specified two BIN 16-bit data are ANDed bit by bit.
Function definition
5 - 39
WAND_M
BOOL WAND_M (BOOL EN, ANY16 S1, ANY16 D);
Argument Name
EN
S1
D
Remarks: For bit devices, the bits greater than in the digit specification are processed
as "0 (zero)".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the 16-bit data in D0 and D10 are
(* ANDed bit by bit, and the result is stored into D10.
WAND_M (X0, D0, D10);
Corresponding MELSEC command
WAND (16-bit data logical product)
WAND_3_M
BOOL WAND_3_M (BOOL EN, ANY16 S1, ANY16 S2, ANY16 D1);
Argument Name
EN
S1
S2
D1
Remarks: For bit devices, the bits greater than in the digit specification are
processed as "0 (zero)".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the 16-bit data in D0 and D10 are
(* ANDed bit by bit, and the result is stored into D100.
WAND_3_M (X0, D0, D10, D100);
Corresponding MELSEC command
WAND (16-bit data logical product)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to AND (BIN 16-bit data)
IN/OUT
Data to be ANDed, operation result (BIN 16-bit data)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be ANDed (BIN 16-bit data)
IN
Data to AND (BIN 16-bit data)
OUT
Operation result (BIN 16-bit data)
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 39