Delta C200 Series User Manual page 333

Intelligent vector control drive
Table of Contents

Advertisement

Call 1(800)985-6929 for Sales
API
SUB
21
D
Bit Devices
X
Y
M
S
1
S
2
D
Operands: None
1.
E xplanation
2.
3.
4.
In 16-bit BIN subtraction:
Example
When X0 = On, the content in D0 will minus the content in D10 and the remainder will
be stored in D20.
Call 1(800)985-6929 for Sales
deltaacdrives.com
S1
S2
D
P
Word Devices
K
H KnX KnY KnM T
: Minuend
: Subtrahend
S
S
1
2
This instruction subtracts S
The highest bit is symbolic bit 0 (+) and 1 (-), which is suitable for algebraic
subtraction.
Flag changes in binary subtraction
In 16-bit instruction:
If the operation result = 0, zero flag M1020 = On.
If the operation result < -32,768, borrow flag M1021 = On.
If the operation result > 32,767, carry flag M1022 = On.
X0
SUB
deltaacdrives.com
Chapter 14 PLC Function |C200 Series
Subtraction
16-bit command (7 STEPS)
SUB
C
D
32-bit command (13 STEPS)
Flag signal: M1020 Zero flag
D: Remainder
and S
in BIN format and stores the result in D.
1
2
D0
D10
D20
14-48
sales@deltaacdrives.com
SUBP
M1021 Borrow flag
M1022 Carry flag
sales@deltaacdrives.com

Advertisement

Table of Contents
loading

Table of Contents