
252
Flags
ER:
Indirectly addressed DM word is non-existent. (Content of
DM word is
not BCD, or the DM area boundary has been exceeded.)
CY:
ON when the result is negative, i.e., when Mi is less than Su plus CY.
EQ
:
ON when the result is 0.
OF
:
ON when the result e2,147,483,647 (7FFF FFFF).
UF
:
ON when the result is below –2,147,483,648 (8000 0000).
N
:
ON when bit 15 of R+1 is set to 1.
Example 1: Normal Data
In this example, the eight-digit number in IR 002 and IR 001 is subtracted from
the eight-digit number in DM 0021 and DM 0020, and the result is output to LR 22
and LR 21. If the result is negative, CY (SR 25504) is turned ON.
CLC(41)
00000
SBBL(––)
001
DM 0020
LR 21
Address
Instruction
Operands
00000
LD
00000
00001
CLC(41)
00002
SBBL(––)
001
DM
0020
LR
21
14 00A3F8C5 = 14A5FA4C
Au + 1 : 002
Au : 001
Ad + 1 : DM 0021
Ad : DM 0020
1
4
0
2
0
1
8
7
0
0
A
3
F
8
C
5
0
R + 1 : LR 22
R : LR 21
0
8
C
2
1
3
5
E
0
CY (Cleared with CLC(41))
CY (No carry)
–
Note
The status of the UF and OF flags can be ignored since they are relevant only in
the subtraction of signed binary data.
In the following example, SBBL(––) is used to subtract one 32-bit signed binary
value from another and output the 32-bit signed binary result to R and R+1.
The effective range for 32-bit signed binary values is –2,147,483,648
(8000 0000) to +2,147,483,647 (7FFF FFFF). The overflow flag (OF: SR 25404)
is turned ON if the result e2,147,483,647 (7FFF FFFF) and the under-
flow flag (UF: SR 25405) is turned ON is the result falls below –2,147,483,648
(8000 0000).
CLC(41)
00000
SBBL(––)
001
DM 0020
LR 21
Address
Instruction
Operands
00000
LD
00000
00001
CLC(41)
00002
SBBL(––)
001
DM
0020
LR
21
Example 2:
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 ...