Calculating The Square Root Of 16-Bit Binary Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Calculating the square root of 16-bit binary data

SQRT(P)
RnPCPU
RnCPU RnENCPU
(Process)
• The RnCPU and RnENCPU with firmware version "17" or later support these instructions. (Use an engineering tool with version "1.020W" or later.)
These instructions perform a square root operation of the specified 16-bit binary data.
Ladder
(s)
*1
FBD/LD
EN
ENO
s
d
*1 The SQRT instruction is not supported by the structured text language and the FBD/LD language. Use the standard function, SQRT.
( Page 1895 SQRT(_E))
■Execution condition
Instruction
SQRT
SQRTP
Setting data
■Description, range, data type
Operand
Description
(s)
Device where the data whose square root is to be
calculated is stored
(d)
Device where the obtained square root is stored
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB,
FX, FY
*1
(s)
*1
(d)
*1 FX and FY cannot be used.
Processing details
• These instructions perform a square root operation of the 16-bit binary data specified by (s). and stores the result in (d).
The obtained square root is an integer because the decimal places are rounded down.
(s)(d)
Operation error
There is no operation error.
7 APPLICATION INSTRUCTIONS
942
7.20 Data Processing Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(d)
Execution condition
Word
J\
T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
*1
ST
ENO:=SQRTP(EN,s,d);
Range
0 to 65535
Double word Indirect
U\G, J\,
Z
LT, LST,
U3E\(H)G
LC
Data type
Data type (label)
16-bit unsigned binary
ANY16
16-bit unsigned binary
ANY16
Bit
BOOL
Bit
BOOL
Constant
specification
LZ
K, H E
Others
$

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents