Publication 1762-RM001C-EN-P
10-4 Math Instructions
ADD - Add
SUB - Subtract
Instruction Type: output
Use the ADD instruction to add one value to another value (Source A +
Source B) and place the sum in the Destination.
Use the SUB instruction to subtract one value from another value (Source
A - Source B) and place the result in the Destination.
ADD
Add
Source A N7:0
0<
Source B N7:1
0<
Dest N7:2
0<
ADD
SUB
Subtract
Source A N7:0
0<
Source B N7:1
0<
Dest N7:2
0<
SUB
Table 10.3 Execution Time for the ADD and SUB Instructions
Controller Instruction Data Size When Rung Is:
True False
MicroLogix 1200 ADD word 2.7
µ
s0.0
µ
s
long word 11.9
µ
s0.0
µ
s
SUB word 3.4
µ
s0.0
µ
s
long word 12.9
µ
s0.0
µ
s
MicroLogix 1500 ADD word 2.5
µ
s0.0
µ
s
long word 10.4
µ
s0.0
µ
s
SUB word 2.9
µ
s0.0
µ
s
long word 11.2
µ
s0.0
µ
s