Learn PLCs free
Math OperationsBeginnerIEC 61131-3

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

NameTypeDescription
IN1ANY_NUMFirst operand
IN2ANY_NUMSecond operand

Outputs

NameTypeDescription
OUTANY_NUMSum 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

S

Siemens (TIA Portal)

Use ADD instruction in TIA Portal. Supports INT, DINT, REAL, LREAL.

AB

Allen-Bradley (Studio 5000)

Use ADD instruction in Studio 5000. Supports all numeric types.

C

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.

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.

20
Ready-Made Templates
LD + ST
Both Languages Included
$29
One-Time Purchase
Get Instant Access -- $29

Instant download - 30-day money-back guarantee - Use on unlimited projects

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →