Publication 1766-RM001A-EN-P - October 2008
Math Instructions 205
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.
MUL - Multiply
DIV - Divide
Instruction Type: output
Use the MUL instruction to multiply one value by another value (Source A
x Source B) and place the result in the Destination.
Use the DIV instruction to divide one value by another value (Source A/
Source B) and place the result in the Destination. If the Sources are single
words and the Destination is directly addressed to S:13 (math register),
then the quotient is stored in S:14 and the remainder is stored in S:13. If
long words are used, then the results are rounded.
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
Execution Time for the ADD and SUB Instructions
Controller Instruction Data Size When Rung Is:
True False
MicroLogix 1400 ADD word 1.8868 µs 0.3540 µs
long word 1.7807 µs 0.3546 µs
SUB word 1.8426 µs 0.3767 µs
long word 1.7651 µs 0.3758 µs
MUL
Multiply
Source A N7:0
0<
Source B N7:1
0<
Dest N7:2
0<
MUL
DIV
Divide
Source A N7:0
0<
Source B N7:1
0<
Dest N7:2
0<
DIV
Execution Time for the MUL and DIV Instructions
Controller Instruction Data Size When Rung Is:
True False
MicroLogix 1400 MUL word 3.3260 µs 0.3920 µs
long word 3.3476 µs 0.3918 µs
DIV word 2.3124 µs 0.3914 µs
long word 2.3636 µs 0.3914 µs
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive