5 - 41 5 - 41
5 MELSEC FUNCTIONS
5.10.5 Block data logical product BKAND_M
n points of 16-bit data, starting at the specified two devices, are ANDed bit by bit.
Function definition
BOOL BKAND_M (BOOL EN, ANY16 S1, ANY16 S2, ANY16 n, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when
the result is TRUE)
S1
IN
Data to be ANDed, operation result (BIN 16-bit data)
S2
IN
Data to AND (BIN 16-bit data)
n
IN
Number of data to be processed (BIN 16-bit data)
D
OUT
Operation result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the data of the number of points
*)
(* stored in D0, starting at D100, and the data of the number of points stored *)
(* in D0, starting at D200, are ANDed, and the result is stored into D1000
*)
(* and later.
*)
BKAND_M (X0, D100, D200, D0, D1000);
Corresponding MELSEC command
BKAND (Block logical product)
5.10.6 Logical sum (2 devices) WOR_M
The specified two BIN 16-bit data are ORed bit by bit.
Function definition
BOOL WOR_M (BOOL EN, ANY16 S1, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when
the result is TRUE))
S1
IN
Data to OR (BIN 16-bit data)
D
IN/OUT
Data to be ORed, operation result (BIN 16-bit data)
Remarks: For bit devices, the bits greater than in the digit specification are
processed as "0 (zero)".
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the data in D10 and D20 are ORed, *)
(* and the result is stored into D10.
*)
WOR_M (X0, D10, D20);
Corresponding MELSEC command
WOR (16-bit data logical sum)
For the usable data type, refer to "3.2.2
About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......