
Chapter 16 PLC Function Applications
│
CFP2000
16-67
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
Please 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.
Using two data sources: The result of subtraction of
S1
and
S2
using the
BIN method is stored in
D
.
The highest bit of any data is symbolized as bit 0 indicating (positive) 1 indicating
(negative), enabling the use of algebraic subtraction operations.
Flag changes connected with subtraction.
1. When calculation results are 0, the zero flag M1020 will be On.
2. When calculation results are less than –32,768, the borrow flag M1021 will be
On.
3. When calculation results are greater than 32,767, the carry flag M1022 will be
On.
16-bit BIN subtraction: When X0=On, the content of D10 is subtracted from the
content of D0, and the difference is stored in D20.
X0
D0
D10 D20
SUB
Summary of Contents for CFP2000 Series
Page 3: ......
Page 12: ...Chapter 1 Introduction CFP2000 1 3 1 2 Model Name 1 3 Serial Number ...
Page 15: ...Chapter 1 Introduction CFP2000 1 6 Frame B RFI 1 RFI 1 RFI 1 RFI 2 RFI 2 RFI 2 Figure 1 5 ...
Page 37: ...Chapter 1 Introduction CFP2000 1 28 1 7 Digital Keypad KPC CC01 ...
Page 42: ...Chapter 3 Unpacking CFP2000 3 1 Chapter 3 Unpacking 3 1 Unpacking 3 2 The Lifting Hook ...
Page 54: ...Chapter 4 Wiring CFP2000 4 5 Figure 4 4 ...
Page 57: ...Chapter 4 Wiring CFP2000 4 8 4 4 Basic Waterproof Component Wiring Diagram Frame A Frame B ...
Page 58: ...Chapter 4 Wiring CFP2000 4 9 Frame C D0 ...
Page 75: ...Chapter 5 Main Circuit Terminals CFP2000 5 16 This page intentionally left blank ...
Page 120: ...Chapter 7 Optional Accessories CFP2000 7 35 Wall Mounting Embedded Mounting ...
Page 137: ...Chapter 7 Optional Accessories CFP2000 7 52 This page intentionally left blank ...
Page 173: ...Chapter 9 Specifications CFP2000 9 8 9 5 Efficiency Curve Figure 9 5 ...
Page 251: ...Chapter 11 Summary of Parameter Settings CFP2000 11 42 This page intentionally left blank ...
Page 304: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 3 3 4 5 ...
Page 305: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 4 6 7 8 ...
Page 306: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 5 9 10 11 ...
Page 307: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 6 12 13 14 ...
Page 308: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 7 15 16 17 ...
Page 309: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 8 18 19 20 ...
Page 310: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 9 21 22 23 ...
Page 311: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 10 24 25 26 ...
Page 312: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 11 27 28 29 ...
Page 313: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 12 30 31 32 ...
Page 314: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 13 33 34 35 ...
Page 315: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 14 36 37 38 ...
Page 326: ...Chapter 12 Description of Parameter Settings CFP2000 12 1 03 25 ...
Page 545: ...Chapter 14 Fault Codes and Descriptions CFP2000 14 50 This page intentionally left blank ...
Page 726: ...Chapter 16 PLC Function Applications CFP2000 16 153 ...
Page 728: ...Chapter 16 PLC Function Applications CFP2000 16 155 ...
Page 731: ...Chapter 16 PLC Function Applications CFP2000 16 158 This page intentionally left blank ...
Page 747: ...Chapter 17 Introduction to BACnet CFP2000 17 16 This page intentionally left blank ...