Chapter 6 Instruction Details
XBC E-Type Main Unit
6-163
Ver. 1
6.28.3 MUL, MULP, DMUL, DMULP
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)
MUL(P)
DMUL(P)
S1 O O O O O O O - O -
- O O O O O
4~6
-
-
-
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
Data to be multiplied by S2
INT/DINT
S2
Data to be multiplied by S1
INT/DINT
D
Address to save operation result in
DINT/LINT
1) MUL (Signed Binary Multiply)
(1) Saves the result of word data S1 multiplied by S2 in D+1,D (32-bit).
(2) At this moment, it performs Signed Operation.
x
1234
b15
b0
S1
2345
b15
b0
S2
2893730
b31
b16 b15
b0
D + 1
D
2) DMUL (Signed Binary Double Multiply)
(1) Saves the result of word data (S1+1,S1) multiplied by (S2+1,S2) in D+3,D+2,D+1,D(32-bit).
(2) If operation result is over 2,147,483,648 (h7FFFFFFF) or below -2,147,483,647(hFFFFFFFF), Carry
Flag will be set.
3) Program Example
(1) For P1000=’100 and P1100=’20’, Input Signal P00000 is changed from Off to On status, the result of
multiplied ‘2000’ is saved in P1200~P1201.
MUL P1000 P1100 P1200
P00000
MUL,DMUL
P S1 S2
MULP, DMULP
S1 S2
means
MUL/DMUL
D
D
Содержание XBC-DN10E
Страница 1: ......
Страница 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...
Страница 52: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 24 Ver 1 3 7 2 XBC DR10E 4 point relay output...
Страница 54: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 26 Ver 1 3 7 3 XBC DN10E 4 point transistor output...
Страница 56: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 28 Ver 1 3 7 4 XBC DR14E 6 point relay output...
Страница 58: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 30 Ver 1 3 7 5 XBC DN14E 6 point transistor output...
Страница 60: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 32 Ver 1 3 7 6 XBC DR20E 8 point relay output...
Страница 62: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 34 Ver 1 3 7 7 XBC DN20E 8 point transistor output...
Страница 64: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 36 Ver 1 3 7 8 XBC DR30E 12 point relay output...
Страница 66: ...Chapter 3 Installation and Wiring XBC E Type Main Unit 3 38 Ver 1 3 7 9 XBC DN30E 12 point transistor output...