
251
In the case below, 1,799,100,099 + (–282,751,929) = 1,516,348,100
(6B EF258C47 = 5A61A2C4). Neither OF nor UF are turned ON.
Au + 1 : LR 21
Au : LR 20
Ad + 1 : DM 0011
Ad : DM 0010
6
B
3
C
1
6
7
D
E
F
2
5
8
C
4
7
0
+
R + 1 : DM 0021
R : DM 0020
A
2
C
4
5
A
6
1
0
CY (Cleared with CLC(41))
UF (SR 25405)
0
OF (SR 25404)
Note
The status of the CY flag can be ignored when adding signed binary data since it
is relevant only in the addition of normal hexadecimal values.
5-20-6 DOUBLE BINARY SUBTRACT – SBBL(––)
Mi
: First minuend word (binary)
IR, SR, AR, DM, HR, TC, LR
Su
: First subtrahend word (binary)
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
R
: First result word
IR, SR, AR, DM, HR, LR
SBBL(––)
Mi
Su
R
@SBBL(––)
Mi
Su
R
Limitations
Mi and Mi+1 must be in the same data area, as must Su and Su+1, and R and
R+1.
Description
When the execution condition is OFF, SBBL(––) is not executed. When the
execution condition is ON, SBBL(––) subtracts CY and the eight-digit value in Su
and Su+1 from the eight-digit value in Mi and Mi+1, and places the result in R and
R+1. If the result is negative, CY is set and the 2’s complement of the actual re-
sult is placed in R+1 and R. Use the DOUBLE 2’s COMPLEMENT instructions to
convert the 2’s complement to the true result.
Mi + 1
Mi
Su + 1
Su
R + 1
R
–
CY
CY
SBBL(––) can also be used to subtract signed binary data. The overflow and un-
derflow flags (SR 25404 and SR 25405) indicate whether the result has exceed-
ed the lower or upper limits of the 32-bit signed binary data range. Refer to page
27 for details on signed binary data.
Binary Calculations
Section 5-20
Содержание SYSMAC C200HE
Страница 1: ...Cat No W303 E1 09 OPERATION MANUAL Programmable Controllers C200HX C200HG C200HE ...
Страница 2: ......
Страница 3: ...C200HX C200HG C200HE Programmable Controllers Operation Manual Revised August 2004 ...
Страница 6: ...vi ...
Страница 10: ......
Страница 12: ......
Страница 380: ......
Страница 410: ......
Страница 438: ......
Страница 464: ......
Страница 474: ......
Страница 522: ......
Страница 538: ......
Страница 552: ...534 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 554: ......
Страница 560: ......
Страница 584: ......
Страница 585: ......
Страница 586: ...W303 E1 09 ...