Instruction Parameters
Supported PLC Series
| PLC-AES | PLC-FB | PLC-ES |
|---|---|---|
| ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S1 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| S2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| D | ✓ | – | ✓ | ✓ | ✓ | – | ✓ | ✓ | – | ✓ | ✓ | ✓ | ✓ | ✓ | – |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | – |
| Carry | F11.2 | – |
Number of Steps
| Steps |
|---|
| 4 |
Operands
| Operand | Description |
|---|---|
| S1 | The 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. |
| S2 | The 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. |
| D | The 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.

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

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. 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, D2.

Memory Monitor

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.
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

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. 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

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.
Function Block Diagram Example


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.

Memory Monitor

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. Every time this instruction executes, it energizes the output only once.
Function Block Diagram Example


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.

Memory Monitor

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.
Instruction List Example
| Step | Instruction | Operand 1 | Operand 2 | Operand 3 | Operand 4 | Operand 5 | Current State |
|---|---|---|---|---|---|---|---|
| 0 | LD | M100 | |||||
| 1 | MOV | 50 | D00 | ||||
| 4 | MOV | 10 | D01 | ||||
| 8 | ADD | D00 | D01 | D02 | |||
| 12 | END | ||||||
| 13 | PEND |
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

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. Every time this instruction executes, it energizes the output only once.
Instruction List Example
| Step | Instruction | Operand 1 | Operand 2 | Operand 3 | Operand 4 | Operand 5 | Current State |
|---|---|---|---|---|---|---|---|
| 0 | LD | M100 | |||||
| 1 | MOV | 50 | D00 | ||||
| 4 | MOV | 10 | D01 | ||||
| 8 | ADDP | D00 | D01 | D02 | |||
| 12 | END | ||||||
| 13 | PEND |
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

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.
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, 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

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. 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, 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

