![Omron SYSMAC C200H Скачать руководство пользователя страница 194](http://html1.mh-extra.com/html/omron/sysmac-c200h/sysmac-c200h_operation-manual_742423194.webp)
181
In the case below, 4F EC3B80C5 = 13B8E27A7. The sum of the
lower 4-digit addition is a 5-digit number, so CY (SR 25504) = 1, and the sum
of the higher 4-digit addition is incremented by 1.
R: DM 0300
2
7
A
7
Au: LR 20
A
6
E
2
Ad: DM 0200
8
0
C
5
+
R: DM 0301
3
B
8
E
Au: LR 21
4
F
5
2
Ad: DM 0201
E
C
3
B
+
CY = 1
Lower 4 digits.
Higher 4 digits.
CY = 1
R+2: DM 0302
R+1: DM 0301
R: DM 0300
0
0
0
1
3
B
8
E
2
7
A
7
5-18-2
BINARY SUBTRACT – SBB(51)
Mi: Minuend word (binary)
IR, SR, AR, DM, HR, TC, LR, #
Su: Subtrahend word (binary)
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
R: Result word
IR, AR, DM, HR, LR
SBB(51)
Mi
Su
R
@SBB(51)
Mi
Su
R
When the execution condition is OFF, SBB(51) is not executed. When the
execution condition is ON, SBB(51) 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
complement of the actual result is placed in R.
Mi – Su – CY
CY R
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.
Example
The following example shows eight-digit subtraction. CY is tested following
the first two subtractions to see if the result is negative. If it is, the first result
is subtracted from zero to obtain the true result, which is placed in HR 10 and
Description
Binary Calculations
Section 5-18
Содержание SYSMAC C200H
Страница 1: ...OPERATION MANUAL C200H CPU01 E 03 E 11 E SYSMAC Programmable Controllers Cat No W130 E1 05 ...
Страница 2: ...C200H Programmable Controllers CPU01 E 03 E 11 E Operation Manual Revised June 2003 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 8: ...TABLE OF CONTENTS ix Glossary 345 Index 363 Revision History 369 ...
Страница 342: ...336 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 374: ...Cat No W130 E1 05 C200H Programmable Controllers CPU01 E 03 E 11 E OPERATION MANUAL ...