Publication 1763-RM001C-EN-P - October 2009
Math Instructions
199
SQR - Square Root
Instruction Type: output
The SQR instruction calculates the square root of the absolute value of the
source and places the rounded result in the destination.
The data ranges for the source is -32768 to 32767 (word) and
-2,147,483,648 to 2,147,483,647 (long word). The Carry Math Status Bit is
set if the source is negative. See Updates to Math Status Bits on page 189
for more information.
SQR
Square Root
Source
N7:0
0<
Dest
N7:1
0<
SQR
Execution Time for the SQR Instruction
Controller
Data Size
When Rung Is:
True
False
MicroLogix 1100
word
109.21
μ
s
0.87
μ
s
long word
109.77
μ
s
0.87
μ
s
SQR Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 82.
Parameter
Data Files
Function Files
C
S
-
Comms
IO
S - I/O
DL
S
-
D
a
ta
L
o
g
Address
Mode
(1)
Address Level
O
I
S
B
T,
C
, R
N
ST
F
L
MG,
PD
R
I/RIX
PL
S
RT
C
HS
C
PT
O,
P
W
M
ST
I
EII
BH
I
MMI
LC
D
Im
mediate
Dir
ect
Indir
e
c
t
Bi
t
Wo
rd
Lo
ng W
o
rd
Elemen
t
Source
•
•
•
•
•
•
•
•
•
•
•
•
•
Destination
•
•
•
•
•
•
•
•
•
•
•
•
(1) See Important note about indirect addressing.
IMPORTANT
You cannot use indirect addressing with: S, ST, MG, PD,
RTC, HSC, PTO, PWM, STI, EII, BHI, MMI, CS, IOS, and
DLS files.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive