![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436236.webp)
226
ADBL(––) can also be used to add signed binary data. The underflow and over-
flow flags (SR 25404 and SR 25405) indicate whether the result has exceeded
the lower or upper limits of the 32-bit signed binary data range. Refer to page 29
for details on signed binary data.
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 greater than FFFF FFFF.
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).
Example 1: Normal Data
The following example shows an eight-digit addition with CY (SR 25504) used to
represent the status of the 9
th
digit.
CLC(41)
00000
ADBL(––)
000
DM 0020
LR 21
Address
Instruction
Operands
00000
LD
00000
00001
CLC(41)
00002
ADBL(––)
000
DM
0020
LR
21
14 00A3F8C5 = 14A5FA4C
Au + 1 : 001
Au : 000
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
F
A
4
C
1
4
A
5
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 addition of signed binary data.
In the following example, ADBL(––) is used to add two 32-bit signed binary val-
ues and output the 32-bit signed binary result to R and R+1. (The 2’s comple-
ment is used to express negative values).
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 if the result falls below –2,147,483,648
(8000 0000).
CLC(41)
00000
ADBL(––)
LR 20
DM 0010
DM 0020
Address
Instruction
Operands
00000
LD
00000
00001
CLC(41)
00002
ADBL(––)
LR
20
DM
0010
DM
0020
Example 2:
Signed Binary Data
Binary Calculations
Section 5-20
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...