Binary Subtract: Sbb(081) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Binary Calculation Instructions

5-19-2 BINARY SUBTRACT: SBB(081)

Ladder Symbol
(081)
SBB
Mi
Variations
j SBB(081)
Description
Precautions
Flags
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.
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.
Su
R
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
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.
Content of *DM word is not BCD when set for BCD.
ER (A50003):
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.
Au: CIO 0010
A
Ad: D00100
+
8
R+1: D01001
0
0
0
1
2
Operand Data Areas
Mi: Minuend word
CIO, G, A, T, C, #, DM, DR, IR
Su: Subtrahend word
CIO, G, A, T, C, #, DM, DR, IR
R: Result word
CIO, G, A, DM, DR, IR
CY R
Section 5-19
6
E
2
0
C
5
R: D01000
7
A
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents