Bcd 8-Digit Multiplication And Division Operations - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

BCD 8-digit multiplication and division operations

DB*(P), DB/(P)
High
Basic
Process
performance
DB , DB/
*
DB P, DB/P
*
(S1): Data to be multiplied/divided or head number of the devices where the data to be multiplied/divided is stored (BCD 8 digits)
(S2): Data for multiplying/dividing or head number of the devices where the data for multiplying/dividing is stored (BCD 8 digits)
(D): Head number of the devices where the multiplication/division operation result will be stored (BCD 16 digits)
Setting
Internal device
data
Bit
(S1)
(S2)
(D)
Processing details
■DB*
• Multiplies the BCD 8-digit data designated by (S1) and the BCD 8-digit data designated by (S2), and stores the product at
the device designated by (D).
+1
S1
9
9
9
9
9
• If (D) has designated a bit device, the lower 8 digits (lower 32 bits) will be used for the product, and the higher 8 digits
(upper 32 bits) cannot be designated.
• K1  Lower 1 digit (b0 to 3)
• K4  Lower 4 digits (b0 to 15)
• K8  Lower 8 digits (b0 to 31)
• 0 to 99999999 (BCD 8 digits) can be assigned to (S1) and (S2).
■DB/
• Divides 8-digit BCD data designated by (S1) and 8-digit BCD data designated by (S2), and stores the result in the device
designated by (D).
+1
S1
5
6
7
8
9
Quotient
(Upper 4 digits)
0
• 64 bits are used for the result of the division operation, and stored as quotient and remainder.
• Quotient (BCD 8 digits)  Stored at the lower 32 bits.
• Remainder (BCD 8 digits)  Stored at the upper 32 bits.
• If (D) has been designated as a bit device, the remainder of the operation will not be stored.
6 BASIC INSTRUCTIONS
242
6.2 Arithmetic Operation Instructions
Redundant Universal
LCPU
Command
Command
R, ZR
Word
S1
9
9
9
9
9
D
+3
D
9
9
9
9
9
9
S1
S2
1
2
3
/
0
1
Digits exceeding the designated number of digits
are assumed to be 0
D
+1
D
(Lower 4 digits)
0
0
0
0
0
4
J\
Bit
Word
+1
S2
S2
9
9
9
9
9
+2
D
+1
9
8
0
0
0
+1
S2
2
3
4
5
6
D
+3
Remainder
(Upper 4 digits)
5
0
1
2
indicates an instruction symbol of DB* , DB/.
S1
S2
P
S1
S2
U\G
Zn
9
D
0
0
0
0
1
7
D
+2
(Lower 4 digits)
3
3
6
0
8
D
D
Constant
Others
K, H

Advertisement

Table of Contents
loading

Table of Contents