![Omron CVM1D Скачать руководство пользователя страница 255](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532255.webp)
250
In the following example, A6E2 + 80C5 = 127A7. The result is a five-digit num-
ber, so CY (A50004) = 1, and the content of R + 1 becomes 0001.
R+1: D01001
R: D01000
0
0
0
1
2
7
A
7
Au: CIO 0010
A
6
E
2
Ad: D00100
8
0
C
5
+
Eight-digit binary numbers can be added more quickly and easily using the
DOUBLE BINARY ADD: ADBL(084) instruction instead of a combination of
ADB(080) instructions.
5-19-2 BINARY SUBTRACT: SBB(081)
Variations
j
SBB(081)
(081)
SBB
Mi
Su
R
Operand Data Areas
Ladder Symbol
Mi: Minuend word
CIO, G, A, T, C, #, DM, DR, IR
R: Result word
CIO, G, A, DM, DR, IR
Su: Subtrahend word
CIO, G, A, T, C, #, DM, DR, IR
When the execution condition is OFF, SBB(081) is not executed. When the
execution condition is ON, SBB(081) subtracts the contents of Su and CY from
Mi and places the result in R. If the result is negative, CY is set and the 2’s com-
plement of the actual result is placed in R. To obtain the true answer when the
result is negative, the 2’s complement placed in R must be subtracted from
0000.
Mi – Su – CY
CY
R
Note An equivalent symbol math instruction (–C(412)) is also available, although
–C(412) has the additional feature of controlling the Overflow (A50009) and Un-
derflow (A50010) Flags.
Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Content of
*
DM word is not BCD when set for BCD.
CY (A50004):
The result is negative, i.e., when Mi is less than Su plus CY.
EQ (A50006):
The result is 0.
N (A50008):
Shows the status of bit 15 of R.
Description
Precautions
Binary Calculation Instructions
Section 5-19
Содержание CVM1D
Страница 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Страница 463: ...iv...
Страница 465: ...vi...