Multiplication Of Bcd 4-Digit Data; Division Of Bcd 4-Digit Data - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.5.9 Multiplication of BCD 4-digit data

The specified two BCD 4-digit data are multiplied.
Function definition

5.5.10 Division of BCD 4-digit data

Division is performed between the specified two BCD 4-digit data.
Function definition
5 - 17
BOOL BMULTI_M (BOOL EN, ANY16 S1, ANY16 S2, ANY32 D);
Argument Name
EN
S1
S2
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BCD 4-digit data stored in D1
(* and D2 are multiplied, and the multiplication result is stored into Result.
BMULTI_M (X0, D1, D2, Result);
Corresponding MELSEC command
B* (BCD 4-digit data multiplication)
BOOL BDIVID_M (BOOL EN, ANY16 S1, ANY16 S2, ANY16(2) D);
Argument Name
EN
S1
S2
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, division is performed between the
(* BCD 4-digit data stored in D1 and D2, and the division result is stored into
(* array ArrayResult.
BDIVID_M (X0, D1, D2, ArrayResult);
Corresponding MELSEC command
B/ (BCD 4-digit data division)
BMULTI_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Multiplicand data (BCD 4-digit data)
IN
IN
Multiplier data (BCD 4-digit data)
OUT
Multiplication result (BCD 4-digit data)
BDIVID_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Dividend data (BCD 4-digit data)
IN
Divisor data (BCD 4-digit data)
IN
Division result
OUT
(ARRAY [0..1] OF ANY16)
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
D[0] Quotient
D[1] Remainder
Description
*)
*)
*)
*)
*)
5 - 17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents