7.12 Special Function Instructions
7.12.24 Square root operation on 4-/8-digit BCD data
7-279
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
BSQ
R, BDSQ
R
BSQR, BDSQR
7.12.24
Square root operation on 4-/8-digit BCD data
BSQR, BDSQR
Function
BSQR(P)
(1) Evaluates the square root function on the value specified for
, and stores the result to the
device specified for
.
(2) Values that can be specified for
are BCD values with a maximum of 4 digits
(from 0 to 9999).
(3) The operation results of
and
+1 are stored as their respective BCD values between 0
and 9999.
(4) The value of the operation result is rounded off at the fifth digit of decimal fraction.
For this reason, the fourth digit of decimal fraction has an error of
±
1.
BSQR(P)
BDSQR(P)
P: Executing condition
:
indicates any of the following
instructions.
BSQR
BSQRP
BDSQR
BDSQRP
Input argument,
EN:
Executing condition
:Bit
s:
Data on which the square root function is evaluated
:ANY16/32
Output argument,
ENO:
Execution result
:Bit
d:
Operation result
:ANY32
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
−
−
−
Universal
UD
High
Performance
Structured ladder
ST
B
SQR
EN
ENO
s
d
B
SQR
(EN,
s
, d);
ENO:=
s
d
s
d
+1
d
s
d
I
nteger
part
Dec
i
ma
l
fract
i
on
.
s
d
d
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......