EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC Q Series

Mitsubishi MELSEC Q Series Programming Manual

Mitsubishi MELSEC Q Series
1296 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #680 background imageLoading...
Page #680 background image
7-306
BSQR(P),BDSQR(P)
BDSQR
(1) Calculates the square root of the values designated by and +1 and stores the results at
the device designated by .
(2) BCD value of a maximum of 8 digits (0 to 99999999) can be designated by and +1.
(3) The operation results of and +1 are stored as their respective BCD values of between
0 and 9999.
(4) Operation results are rounded off from the fifth decimal place.
For this reason, the fourth decimal place has an error of
±1.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• The data designated by is not a BCD value. (Error code: 4100)
Program Example
(1) The following program calculates the square root of BCD value 1325 and outputs the integer
part to the 4 BCD digits from Y50 to Y5F, and the decimal fraction part to the 4 BCD digits
from Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operation]
S S
D
+1
D
S
D
(
)
2-word data
+1
Integer part
Decimal fraction part
.
S
S S
D D
S
Sets the data used for
square root operation ( )
Executes square root operation ( )
Outputs the integer part of the operation
result to a display device ( )
Outputs the decimal fraction part of the
operation result to a display device ( )
1
2
3
4
Step Instruction Device
BSQR operation
BSQR
D1
BCD value
0036
D2
BCD value
4005
D0
BCD value
1
32
5
MOV
1325
H
Y5F
BCD value
0036
Y50
Y4F
BCD value
4005
Y40
Transfer
MOV
Transfer
Integer part
Decimal fraction part

Table of Contents

Other manuals for Mitsubishi MELSEC Q Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC Q Series and is the answer not in the manual?

Mitsubishi MELSEC Q Series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC Q Series
CategoryController
LanguageEnglish

Related product manuals