ADD (Addition)
Adds two or more numeric values and outputs the sum.
The ADD function block performs arithmetic addition of two or more input values and produces the sum as output. It works with all numeric data types including INT, DINT, REAL, and LREAL. ADD is used extensively in PLC programs for totalizing values, calculating offsets, accumulating quantities, and performing recipe calculations.
Parameters
Inputs
| Name | Type | Description |
|---|---|---|
| IN1 | ANY_NUM | First operand |
| IN2 | ANY_NUM | Second operand |
Outputs
| Name | Type | Description |
|---|---|---|
| OUT | ANY_NUM | Sum of inputs (IN1 + IN2) |
Ladder Logic Example
// Ladder Logic - ADD (Totalizer) // // |----[ADD]----| // | IN1: Total_Count | // | IN2: New_Parts | // | OUT: Total_Count |
Structured Text Example
Total_Count := Total_Count + New_Parts; // Or using ADD function: Total_Weight := ADD(Box_Weight, Pallet_Weight);
20 Production-Ready Ladder Logic Templates
Stop writing the same rungs from scratch. Get copy-paste-ready templates for motor control, PID loops, safety interlocks, conveyors, and more.
Platform-Specific Implementation
Siemens (TIA Portal)
Use ADD instruction in TIA Portal. Supports INT, DINT, REAL, LREAL.
Allen-Bradley (Studio 5000)
Use ADD instruction in Studio 5000. Supports all numeric types.
CODESYS
Use + operator in ST or ADD function block in FBD/LD.
Common Applications
- Production totalizing
- Analog offset calculation
- Recipe value accumulation
- Position offset
- Batch weight totals
Frequently Asked Questions
What is ADD (Addition) in PLC programming?
Adds two or more numeric values and outputs the sum. The ADD function block performs arithmetic addition of two or more input values and produces the sum as output. It works with all numeric data types including INT, DINT, REAL, and LREAL.
What are common applications of ADD (Addition)?
ADD (Addition) is commonly used for: Production totalizing, Analog offset calculation, Recipe value accumulation, Position offset, Batch weight totals.
How do I use ADD (Addition) in different PLC platforms?
Siemens: Use ADD instruction in TIA Portal. Supports INT, DINT, REAL, LREAL. Allen-Bradley: Use ADD instruction in Studio 5000. Supports all numeric types. CODESYS: Use + operator in ST or ADD function block in FBD/LD.
Related Function Blocks
SUB (Subtraction)
Subtracts second input from first input, outputs the difference.
View Reference →MUL (Multiplication)
Multiplies two numeric values and outputs the product.
View Reference →DIV (Division)
Divides first input by second input, outputs the quotient.
View Reference →MOD (Modulo)
Returns the remainder after integer division of two values.
View Reference →ABS (Absolute Value)
Returns the absolute (non-negative) value of the input.
View Reference →Stop Writing Ladder Logic From Scratch
Get 20 production-ready ladder logic templates for $29 -- download instantly and use them on your next project today.
Instant download - 30-day money-back guarantee - Use on unlimited projects