EasyManua.ls Logo

Cutler-Hammer D50 - Mul, Dmul, Mulb, Dmulb

Cutler-Hammer D50
228 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
80 D50 PLC User's Manual
Instruction
Mnemonic Multiplication Range
Bit
Byte
MUL
DMUL
MULB
DMULB
Decimal multiplication (MUL,
DMUL)
BCD multiplication (MULB,
DMULB)
Word
Ladder
D = S1 × S2
Decimal: S1 = 3 and S2 = 7
Hexadecimal: S1 = $03 and S2 = $07
MUL Example:
Decimal: 3 × 7 = 21
MULB Example:
BCD: $03
× $07 = $21
Description
1. Multiply the data in the S1 and S2 addresses, then store the result in the D register.
2. When using MUL and MULB, the calculation ranges are as follows:
S1: 0 to 255 (0 to $FF)
S2: 0 to 255 (0 to $FF)
D: 0 to 255 (0 to $FF)
3. When using DMUL and DMULB, the calculation ranges are as follows:
S1: 0 to 65,535 (0 to $FFFF)
S2: 0 to 65,535 (0 to $FFFF)
D: 0 to 65,535 (0 to $FFFF)
4. If the result exceeds the range of calculation, a carry occurs. The carry flag (F1.8) is changed
to On. The high word of the result that exceeds the range of D is automatically stored in
SR20.
5. This operation will occur on every scan for which the input condition is true (On). To perform
the operation only on a change of input condition, use the rising/falling edge contact.
Example
Program Expression Operation Results
Initial conditions: W0 = 00002 = $0002
W1 = 00030 = $001D
W2 = 00006 = $0006
W3 = 00500 = $01E4
Operation results: W10 = 00012 = $000C
W11 = 15000 = $3A98
W12 = 00018 = $0012
MUL
D =
S1 =
S2 =
R
R
MULB
D =
S1 =
S2 =
MUL
D = W10
S1 = W0
S2 = W2
DMUL
D = W11
S1 = W1
S2 = W3
MULB
D = W12
S1 = W0
S2 = W2
R0
R
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Related product manuals