Chapter 16 PLC Function Applications
MS300
(High Speed Model)
16-54
API
ADD
S1
S2
D
BIN addition
20
D
P
Bit device
Word device
16-bit command (7 STEP)
ADD
Continuous
execution type
ADDP
Pulse
execution type
32-bit command (13 STEP)
DADD
Continuous
execution type
DADDP
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
: Augend.
S2
: Addend.
D
: Sum.
Using two data sources: The result of adding
S1
and
S2
using the BIN
method will be stored in
D
.
The highest bit of any data is symbolized as bit 0 indicating (positive) 1 indicating
(negative), enabling the use of algebraic addition operations. (for instance:
3+(-9)=-6)
Flag changes connected with the addition.
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 addition: When X0=On, the result of the content of addend D0 plus the
content of augend D10 will exist in the content of D20.
X0
D0
D10 D20
ADD
Relationship between flag actions and negative/positive numbers:
-2, -1, 0 -32,768
-1, 0 1
32,767 0 1 2
-2, -1, 0 -2,147,483,648
-1, 0 1
2,147,483,647 0 1 2
16 bit: Zero flag
Zero flag
Zero flag
Borrow flag
The highest bit
of the data
= 1 (negative)
32 bit: Zero flag
Zero flag
Zero flag
The highest bit
of the data
= 0 (positive)
Carry flag
Borrow flag
Carry flag
The highest bit
of the data
= 1 (negative)
The highest bit
of the data
= 0 (positive)
Содержание VFD11AMS21AFSHA
Страница 5: ...IV This page intentionally left blank...
Страница 8: ...Chapter 1 Introduction MS300 High Speed Model 1 3 1 2 Model Name 1 3 Serial Number...
Страница 20: ...Chapter 3 Installation MS300 High Speed Model 3 3...
Страница 21: ...Chapter 3 Installation MS300 High Speed Model 3 4 This page intentionally left blank...
Страница 22: ...Chapter 4 Wiring MS300 High Speed Model 4 1 Chapter 4 Wiring 4 1 Wiring 4 2 System Wiring Diagram...
Страница 24: ...Chapter 4 Wiring MS300 High Speed Model 4 3 4 1 Wiring...
Страница 25: ...Chapter 4 Wiring MS300 High Speed Model 4 4 Figure 1...
Страница 27: ...Chapter 4 Wiring MS300 High Speed Model 4 6 4 2 System Wiring Diagram...
Страница 43: ...Chapter 6 Control Terminals MS300 High Speed Model 6 6 This page intentionally left blank...
Страница 91: ...Chapter 8 Optional Cards MS300 High Speed Model 8 8 Frame F Fig 8 16...
Страница 115: ...Chapter 9 Specification MS300 High Speed Model 9 10 This page intentionally left blank...
Страница 123: ...Chapter 10 Digital Keypad MS300 High Speed Model 10 8 This page intentionally left blank...
Страница 204: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 3 Diagram 03 Diagram 04 Diagram 05...
Страница 205: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 4 Diagram 06 Diagram 07 Diagram 08...
Страница 206: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 5 Diagram 09 Diagram 10 Diagram 11...
Страница 207: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 6 Diagram 12 Diagram 13 Diagram 14...
Страница 208: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 7 Diagram 15 Diagram 16 Diagram 17...
Страница 209: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 8 Diagram 18 Diagram 19 Diagram 20...
Страница 210: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 9 Diagram 21 Diagram 22 Diagram 23...
Страница 211: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 10 Diagram 24 Diagram 25 Diagram 26...
Страница 212: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 11 Diagram 27 Diagram 28 Diagram 29...
Страница 213: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 03 12 Diagram 30 Diagram 31 Diagram 32...
Страница 287: ...Chapter 12 Description of Parameter Settings MS300 High Speed Model 12 14 7 This page intentionally left blank...
Страница 293: ...Chapter 13 Warning Codes MS300 High Speed Model 13 6 This page intentionally left blank...
Страница 303: ...Chapter 14 Error Codes MS300 High Speed Model 14 10 This page intentionally left blank...