![LS Industrial Systems XBC-DN10E User Manual Download Page 295](http://html1.mh-extra.com/html/ls-industrial-systems/xbc-dn10e/xbc-dn10e_user-manual_1943831295.webp)
Chapter 6 Instruction Details
XBC E-Type Main Unit
6-178
Ver. 1
6.29.3 MULB, MULBP, DMULB, DMULBP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
MULB (P)
DMULB(P)
S1 O O O O O O O - O -
- O O O O O
4~6
O
O
-
S2 O O O O O O O - O -
- O O O O O
D O O O - O O O - O -
-
- O O O O
Operand
Description
Data Type
S1
BCD data to be multiplied by S2
WORD/DWORD
S2
BCD data to be multiplied by S1
WORD/DWORD
D
Address to save operation result in
DWORD/LWORD
[Flag Set]
Flag
Description
Device Number
Error
If the value of S1 and S2 is not of BCD format.
F110
Zero
To be set if operation result is Zero.
F111
1) MULB (BCD Multiply)
(1) Saves the result of BCD data S1 multiplied by S2 in (D, D+1).
(2) Based on operation result, Error (F110) or Zero (F111) Flag will be set.
5
6
7
8
S1
0
8
7
6
S2
3
9
2
8
0
4
9
7
D+1
Upper 4-digit
D
Lower 4-digit
2) DMULB (BCD Double Multiply)
(1) Saves the result of BCD data (S1, S1+1) multiplied by (S2, S2+1) in (D, D+1, D+2, D+4).
(2) Based on operation result, Error(F110) or Zero(F111) Flag will be set.
9
9
9
9
S1 +
1
9
9
9
9
S1
9
9
9
9
9
9
9
9
S2 +
1
S2
9
9
9
9
D + 2
9
9
9
9
9
9
9
9
9
9
9
9
D + 3
D + 1
D
3) Program Example
(1) For P1000=‘100’ and P1100=‘10’, if Input Signal P00000 is changed from Off to On status, BCD data ‘1000’
is saved in P1200 and P1201, 2-word area.
MULB P1000 P1100 P1200
P00000
MULB, DMULB
P S1 S2
MULBP, DMULBP
S1 S2
means
MULB/DMULB
D
D
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...