EasyManua.ls Logo

Delta VFD17AMS23ANSAA - Page 724

Delta VFD17AMS23ANSAA
805 pages
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...
Chapter 16 PLC Function ApplicationsMS300
715
API
SUB
S1 S2 D
BIN subtraction
21
D
P
bit device
Word device
16-bit command (7 STEP)
SUB
Continuous
execution type
SUBP
Pulse
execution type
32-bit command (13 STEP)
DSUB
Continuous
execution type
DSUBP
Pulse
execution type
Flag signal: M1020 Zero flag
M1021 Borrow flag
M1022 Carry flag
Refer to the following supplementary
explanation
X
Y
M
K
H
KnX
KnY
KnM
T
C
D
S1
S2
D
Notes on operand usage: none
S1: Minuend. S2: Subtrahend. D: Difference.
Subtracts S2 from S1 using the BIN method and stores result in D.
The highest bit of any data defines the sign bit = 0 indicates (positive) bit = 1
indicates (negative); enables the use of algebraic subtraction operations.
Flag changes connected with subtraction.
16-bit commend:
1. When calculation results are 0, the zero flag M1020 is ON.
2. When calculation results are less than -32,768, the borrow flag M1021 is ON.
3. When calculation results are greater than 32,767, the carry flag M1022 is ON.
32-bit commend:
1. When calculation results are 0, the zero flag M1020 is ON.
2. When calculation results are less than -2,147,483,648, the borrow flag M1021 is
ON.
3. When calculation results are greater than 2,147,483,6477, the carry flag M1022
is ON.
16-bit BIN subtraction: When X0 = ON, subtracts the content of D10 from the
content of D0, and stores the difference in D20.
X0
D0 D10
D20
SUB

Table of Contents

Other manuals for Delta VFD17AMS23ANSAA

Related product manuals