Multiplication Of Bcd 8-Digit Data; Division Of Bcd 8-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.11 Multiplication of BCD 8-digit data

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

5.5.12 Division of BCD 8-digit data

Division is performed between the specified two BCD 8-digit data.
Function definition
5 - 18
BOOL DBMULTI_M (BOOL EN, ANY32 S1, ANY32 S2, ANY16(4) D);
Argument Name
EN
S1
S2
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BCD 8-digit data stored in
(* dwData1 and dwData2 are multiplied, and the multiplication result is stored
(* into array ArrayResult.
DBMULTI_M (X0, dwData1, dwData2, ArrayResult);
Corresponding MELSEC command
DB* (BCD 8-digit data multiplication)
BOOL DBDIVID_M (BOOL EN, ANY32 S1, ANY32 S2, ANY32(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 8-digit data stored in dwData1 and dwData2, and the division result is
(* stored into array ArrayResult.
DBDIVID_M (X0, dwData1, dwData2, ArrayResult);
Corresponding MELSEC command
DB/ (BCD 8-digit data division)
DBMULTI_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Multiplicand data (BCD 8-digit data)
IN
IN
Multiplier data (BCD 8-digit data)
Multiplication result
OUT
(ARRAY [0..3] OF ANY16)
DBDIVID_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Dividend data (BCD 8-digit data)
IN
Divisor data (BCD 8-digit data)
IN
Division result
OUT
(ARRAY [0..1] OF ANY32)
For the usable data type, refer to "3.2.2
About ANY type".
Description
D[0]
D[1]
D[2]
D[3]
Description
Description
D[0] Quotient
D[1] Remainder
Description
Lower 4 digits
Upper 4 digits
*)
*)
*)
*)
*)
*)
5 - 18

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents