6F3B0250
7. Instructions
FUN 027
+
Addition
Expression
Input
Function
When the input is ON, the data of A and the data of B are added, and the result is stored in C.
If the result is greater than 32767, the upper limit value 32767 is stored in C, and the output is turned ON. If the result is smaller than
Execution condition
Input | Operation | Output |
OFF | No execution | OFF |
ON | Execution (normal) | OFF |
| Execution (overflow or underflow occurred) | ON |
Operand
| Name |
|
| Device |
|
|
|
|
|
| Register |
|
|
|
| Constant | Index | ||
|
| X | Y | R | S | T. | C. | XW | YW | RW | SW | T | C | D | I | J | K |
|
|
A | Augend |
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö |
B | Addend |
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö |
C | Sum |
|
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö |
| Ö |
Example
When R005 is ON, the data of D0100 and the constant data 1000 is added, and the result is stored in D0110.
If the data of D0100 is 12345, the result 13345 is stored in D0110, and R010 is turned OFF.
D0100
Constant
12345
+ D0110
1000
13345
R010 is OFF
If the data of D0100 is 32700, the result exceeds the limit value, therefore 32767 is stored in D0110, and R010 is turned ON.
D0100
Constant
32700
1000
Overflow
+ D0110
32767
R010 is ON
Basic Hardware and Function 161
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net