![background image](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532250.webp)
245
The following example works much like that for single-word subtraction. In this
example, however, the 8-digit number in CIO 0121 and CIO 0120 is subtracted
from the 8-digit number in CIO 0201 and CIO 0200 when CIO 000003 is ON, and
the result is output to D00101 and D00100. If the result is negative, the comple-
ment is then subtracted from 0 to yield the actual number and CIO bit 002100 (a
self-holding bit) is turned ON to indicate the negative result.
00000
LD
000003
00001
OUT
TR0
00002
CLC(079)
00003
SUBL(075)
1220
1200
D00100
00004
AND
A50004
00005
BSET(041)
#0000
D00000
D00001
00006
CLC(079)
00007
SUBL(075)
D00000
D00100
D00100
00008
LD
TR0
00009
AND
A50004
00010
OR
122100
00011
OUT
122100
First
subtraction
Second
subtraction
Turned ON to
indicate nega-
tive result.
Address
Instruction
Operands
(079)
CLC
(075)
SUBL
1220
1200
D00100
(041)
BSET
#0000
D00000
D00001
(079)
CLC
(075)
SUBL
D00000
D00100
D00100
0000
03
A500
04
A500
04
1221
00
1221
00
TR0
5-18-9 DOUBLE BCD MULTIPLY: MULL(076)
Variations
j
MULL(076)
(076)
MULL
Md
Mr
R
Operand Data Areas
Ladder Symbol
Md: 1
st
multiplicand wd CIO, G, A, T, C, #, DM
R: 1
st
result word
CIO, G, A, DM
Mr: 1
st
multiplier word
CIO, G, A, T, C, #, DM
When the execution condition is OFF, MULL(076) is not executed. When the
execution condition is ON, MULL(076) multiplies the 8-digit content of Md and
Md+1 by the content of Mr and Mr+1, and places the result in R to R+3.
Md + 1
Md
Mr + 1
Mr
R + 1
R
R + 3
R + 2
x
Note An equivalent symbol math instruction (
*
BL(425)) is also available.
Md, Md+1, Mr, and Mr+1 must be BCD.
Note Refer to page 101 for general precautions on operand data areas.
Example
Description
Precautions
BCD Calculation Instructions
Section 5-18
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...