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
CS - Comms
IOS - I/O
DLS - Data Log
Address
Mode
(1)
Address Level
O
I
S
B
T, C, R
N
ST
F
L
MG, PD
RI/RIX
PLS
RTC
HSC
PTO, PWM
STI
EII
BHI
MMI
LCD
Immediate
Direct
Indirect
Bit
Word
Long Word
Element
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