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);
Free · no signup to try
Run this block in your browser
Try the instruction on a live rung before you copy it into a project — nothing to install.
Try it in your browser — no signupOpens plcsimulationsoftware.com — same team
Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad
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 →Free · no signup to try
Wire this block up and run it
Drop the instruction into a rung, press Run and watch it execute in your browser — then adapt it to your vendor tool.
Try it in your browser — no signupOpens plcsimulationsoftware.com — same team
Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad