Publication 1763-RM001C-EN-P - October 2009
194
Math Instructions
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.
NEG - Negate
Instruction Type: output
Use the NEG instruction to change the sign of the Source and place the
result in the Destination.
CLR - Clear
Instruction Type: output
Use the CLR instruction to set the Destination to a value of zero.
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 1100
MUL
word
20.59
μ
s
0.87
μ
s
long word
20.68
μ
s
0.87
μ
s
DIV
word
14.68
μ
s
0.87
μ
s
long word
14.96
μ
s
0.87
μ
s
NEG
Negate
Source
N7:0
0<
Dest
N7:1
0<
NEG
Execution Time for the NEG Instruction
Controller
Data Size
When Rung Is:
True
False
MicroLogix 1100
word
8.78
μ
s
0.87
μ
s
long word
9.62
μ
s
0.87
μ
s
CLR
Clear
Dest
N7:0
0<
CLR
Execution Time for the CLR Instruction
Controller
Data Size
When Rung Is:
True
False
MicroLogix 1100
word
5.29
μ
s
0.87
μ
s
long word
5.46
μ
s
0.87
μ
s
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive