5 - 20 5 - 20
5 MELSEC FUNCTIONS
5.5.15 BIN block addition BKPLUS_M
n points of BIN 16-bit data, starting at the specified devices, are added.
Function definition
BOOL BKPLUS_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
Augend data (BIN 16-bit data)
S2 IN
Addend data (BIN 16-bit data)
n IN
Number of addition data (BIN 16-bit data)
D
OUT
Addition 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 added, and the result is stored into D1000 and later. *)
BKPLUS_M (X0, D100, D200, D0, D1000);
Corresponding MELSEC command
BK+ (Block data addition)
5.5.16 BIN block subtraction BKMINUS_M
Subtraction is performed between n points of BIN 16-bit data, starting at the specified devices.
Function definition
BOOL BKMINUS_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
Minuend data (BIN 16-bit data)
S2 IN
Subtrahend data (BIN 16-bit data)
n IN
Number of subtraction data (BIN 16-bit data)
D OUT
Subtraction result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, subtraction is performed between
*)
(* 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, and the result is
*)
(* stored into D1000 and later.
*)
BKMINUS_M (X0, D100, D200, D0, D1000);
Corresponding MELSEC command
BK- (Block data subtraction)
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: ......