Publication 1766-RM001A-EN-P - October 2008
Math Instructions 211
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…32767 (word) and
-2,147,483,648…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 200
for more information.
SIN - Sine
Instruction Type: output
The SIN instruction places the sine of the Source (in radians) in the
Destination.
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 1400 word 54.8140 µs 0.3561 µs
long word 45.1450 µs 0.3732 µ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 92.
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
PTOX, PWMX
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, MG, PD, RTC, HSC, PTOX,
PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
ABS
Sine
Source N7:0
0<
Dest N7:1
0<
SIN
Execution Time for the SIN Instruction
Controller Data Size When Rung Is:
True False
MicroLogix 1400 word 92.8635 µs 0.4210 µs
long word 95.0760 µs 0.4210 µs
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive