5 - 14 5 - 14
5 MELSEC FUNCTIONS
5.5.3 Subtraction of BCD 4-digit data (2 devices) BMINUS_M
Subtraction is performed between the specified two BCD 4-digit data.
Function definition
BOOL BMINUS_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
Subtrahend data (BCD 4-digit data)
D
IN/OUT
Minuend data, subtraction result (BCD 4-digit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, subtraction is performed between the *)
(* BCD 4-digit data stored in D0 and D100, and the subtraction result is stored *)
(* into D100.
*)
BMINUS_M (X0, D0, D100);
Corresponding MELSEC command
B- (BCD 4-digit data subtraction)
5.5.4 Subtraction of BCD 4-digit data (3 devices) BMINUS_3_M
Subtraction is performed between the specified two BCD 4-digit data.
Function definition
BMINUS_3_M (BOOL EN, ANY16 S1, ANY16 S2, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1 IN
Minuend data (BCD 4-digit data)
S2 IN
Subtrahend data (BCD 4-digit data)
D OUT
Subtraction result (BCD 4-digit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, subtraction is performed between the
*)
(* BCD 4-digit data stored in D1 and D2, and the subtraction result is stored
*)
(* into D100.
*)
BMINUS_3_M (X0, D1, D2, D100);
Corresponding MELSEC command
B- (BCD 4-digit 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: ......