Example - Instruction List
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
![]()