EasyManua.ls Logo

Cutler-Hammer D50 - Sbc, Dsbc, Sbcb, Dsbcb

Cutler-Hammer D50
228 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
84 D50 PLC User's Manual
Instruction
Command Subtraction with Carry Range
Bit
Byte
SBC
DSBC
SBCB
DSBCB
Decimal subtraction with carry
(SBC, DSBC)
BCD subtraction with carry
(SBCB, DSBCB)
Word
Ladder
D = S1 - S2 - carry
Decimal: S1 = 34 and S2 = 19
Hexadecimal: S1 = $22 and S2 = $13
Carry Flag: F1.8 = On
SBC Example:
Decimal: 34 - 19 - 1 = 14
SBCB Example:
BCD: $22 - $13 - $01 = $08
Description
1. Subtract the data in S2 from S1. If the carry flag F1.8 is On, subtract 1. Then store the result
in the D register.
2. When using SBC and SBCB, the calculation ranges are as follows:
S1: 0 to 255 (0 to $FF)
S2: 0 to 255 (0 to $FF)
D: 0 to 255 (0 to $FF)
3. When using DSBC and DSBCB, the calculation ranges are as follows:
S1: 0 to 65,535 (0 to $FFFF)
S2: 0 to 65,535 (0 to $FFFF)
D: 0 to 65,535 (0 to $FFFF)
4. If the result exceeds the range of calculation, a carry occurs. The carry flag (F1.8) is changed
to On.
5. This operation will occur on every scan for which the input condition is true (On). To perform
the operation only on a change of input condition, use the rising/falling edge contact.
SBC
D =
S1 =
S2 =
R
R
SBCB
D =
S1 =
S2 =
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Related product manuals