Double Binary Subtract: Sbbl(085) - Omron SYSMAC CV Series Operation Manual

Ladder diagrams
Hide thumbs Also See for SYSMAC CV Series:
Table of Contents

Advertisement

Binary Calculation Instructions

5-19-6 DOUBLE BINARY SUBTRACT: SBBL(085)

Ladder Symbol
(085)
SBBL
Mi
Variations
j SBBL(085)
Description
Precautions
Flags
Example
0000
00
268
Su
R
When the execution condition is OFF, SBBL(085) is not executed. When the
execution condition is ON, SBBL(085) subtracts CY and the 8-digit value in Su
and Su+1 from the 8-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. To convert the 2's complement to the true result, subtract the
content of R from zero.
CY
Note With version-2 CVM1 CPUs, mathematics instructions can use symbols. The
instructions corresponding to SUB(081) and SUBL(085) are –C(412) and –
CL(413). In addition, Overflow (A50009) and Underflow (A50010) Flags are
added.
Refer to page 115 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.
EQ (A50006):
The result is 0.
N (A50008):
Shows the status of bit 15 of R+1.
In this example, the 8-digit number in CIO 0201 and CIO 0200 is subtracted
from the 8-digit number in D00101 and D00100 when CIO 000000 is ON, and the
result is output to D00501 and D00500. If the result is negative, CY (A50004) is
turned ON and the 2's complement of the result is output to D00501 and
D00500. Refer to 5-19-2 BINARY SUBTRACT: SBB(081) for an example of con-
verting a 2's complement.
(085)
SBBL
D00100
0200
Operand Data Areas
st
Mi: 1
minuend word
CIO, G, A, T, C, #, DM
st
Su: 1
subtrahend wordCIO, G, A, T, C, #, DM
st
R: 1
result word
CIO, G, A, DM
Mi + 1
Mi
Su + 1
Su
CY
R + 1
R
(079)
CLC
D00500
Section 5-19
Address Instruction
Operands
00000
LD
000000
00001
CLC(079)
00002
SBBL(085)
D00100
D00500
0200

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cv2000Cvm1Cv500Cv1000

Table of Contents