The leader in industrial automation and control solutions

Instruction Parameters

Supported PLC Series

PLC-AESPLC-FBPLC-ES

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S1
S2
D

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1
CarryF11.2

Number of Steps

Steps
4

Operands

OperandDescription
S1The first operand.
Entries are WORD data registers or constants.

The signed value range is -32,768 ~ 32,767 (216).
The unsigned value range is 0 ~ 65,535 (216-1).
The Hexadecimal value range is H0000 ~ HFFFF.
S2The second operand.
Entries are WORD data registers or constants.

The signed value range is -32,768 ~ 32,767 (216).
The unsigned value range is 0 ~ 65,535 (216-1).
The Hexadecimal value range is H0000 ~ HFFFF.
DThe third operand.
Entries are only WORD data registers.
This is where the sum is saved.

Notice

Error Flag (F11.0) Notice

The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type. F11.0 turns ON when the value of the data for adding exceeds the data register assigned to S1 or S2.

Tip: Signed Notation

The signed value range for ADD and ADDP is -32,768 ~ 32,767 (216). – If the ADD or ADDP instruction is executed while the value for the sum data register, D, is 32,767, the overflow value for the sum data register, D, will begin at -32,768. – If the ADD or ADDP instruction is executed while the value for the sum data register, D, is -32,768, the overflow value for the sum data register, D, will begin at 32,767 if the number being added is -1.

Ladder Diagram Examples

ADD

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Ladder Diagram Example for MapleLogic ADD/ADDP instruction.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

ADDP

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D. Every time this instruction executes, it energizes the output only once.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Ladder Diagram Example for MapleLogic ADD/ADDP instruction.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

Structured Text Examples

ADD

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

Structured Text Example

// Move values into data registers
IF mx100 = 1 THEN
    MOV (50, dw0);
    MOV (10, dw1);
END_IF;

// Add data registers
IF mx00 = 1 THEN
    ADD (dw0, dw1, dw2);
END_IF;Code language: JavaScript (javascript)

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

ADDP

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D. Every time this instruction executes, it energizes the output only once.

Structured Text Example

// Move values into data registers
IF mx100 = 1 THEN
    MOV (50, dw0);
    MOV (10, dw1);
END_IF;

// Add data registers
IF mx00 = 1 THEN
    ADDP (dw0, dw1, dw2);
END_IF;Code language: JavaScript (javascript)

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

Function Block Diagram Examples

ADD

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

Function Block Diagram Example

Function Block Diagram Example for MapleLogic ADD/ADDP instruction.
When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2. Then, the value of the WORD data register, D2, is moved into the WORD data register, D10.

Function Block Diagram Example for MapleLogic ADD/ADDP instruction.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

ADDP

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D. Every time this instruction executes, it energizes the output only once.

Function Block Diagram Example

Function Block Diagram Example for MapleLogic ADD/ADDP instruction.
When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2. Then, the value of the WORD data register, D2, is moved into the WORD data register, D10.

Function Block Diagram Example for MapleLogic ADD/ADDP instruction.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

Instruction List Examples

ADD

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

Instruction List Example

StepInstructionOperand 1Operand 2Operand 3Operand 4Operand 5Current State
0LDM100
1MOV50D00
4MOV10D01
8ADDD00D01D02
12END
13PEND

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

ADDP

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D. Every time this instruction executes, it energizes the output only once.

Instruction List Example

StepInstructionOperand 1Operand 2Operand 3Operand 4Operand 5Current State
0LDM100
1MOV50D00
4MOV10D01
8ADDPD00D01D02
12END
13PEND

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

Sequential Function Chart Examples

ADD

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADD instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

Sequential Function Chart Example

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.

ADDP

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D.

The ADDP one-shot instruction adds a WORD value, S1, to a WORD value, S2, and saves the sum in an assigned WORD data register, D. Every time this instruction executes, it energizes the output only once.

Sequential Function Chart Example

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M10.0, is powered ON, 50 is moved into the WORD data register, D0, and 10 is moved into the WORD data register, D1.

When the contact, M0.0, is powered ON, the WORD data register, D0, is added to the WORD data register, D1, and the sum saved in the WORD data register, D2.

Memory Monitor

Memory Monitor for MapleLogic ADD/ADDP instruction.