Try a PLC free — no signup
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);

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 signup

Opens plcsimulationsoftware.com — same team

Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad

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.

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 signup

Opens plcsimulationsoftware.com — same team

Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad