Download Print this page

Calculating The Square Root Of 32-Bit Data - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Calculating the square root of 32-bit data

DSQRT(P)
These instructions calculate the square root of binary 32-bit data specified by (s1), and store the operation result in (d).
Ladder diagram
(s)
(d)
FBD/LD
EN
ENO
s
d
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Device where the data whose square root is operated is
calculated
(d)
Device for storing the calculated square root
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
Processing details
• These instructions calculate the square root of binary 32-bit data specified by (s1), and store the operation result in (d).
(s)+1, (s)
(d)+1, (d)
Precautions
• The obtained square root is an integer because the decimal point is ignored. When the calculated decimal value is ignored,
SM8021 (borrow flag) turns on.
• When the operation result is true 0, SM8020 (zero flag) turns on.
Operation error
Error code
Description
(SD0/SD8067)
3405H
In (s), a negative value is specified.
Word
T, ST, C, D, W,
U\G
SD, SW, R
Structured text
ENO:=DSQRT(EN,s,d);
ENO:=DSQRTP(EN,s,d);
Range
Data type
32-bit signed binary
32-bit signed binary
Bit
Bit
Double word Indirect
specification
Z
LC
LZ
Data type (label)
ANY32
ANY32
BOOL
BOOL
Constant
Others
K, H
E
$
8 APPLICATION INSTRUCTION
8.22 Data Operation Instruction
8
681

Hide quick links:

Advertisement

loading