EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 633

Mitsubishi Electric MELSEC-Q/L
1084 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
Loading...
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
631
7
Program example
The following program seeks the square root of the value set by the 4 BCD digits from X20 to X2F, and stores the result as
a 32-bit floating decimal point type real number at D0 and D1.
[Ladder Mode]
[List Mode]
[Operations involved when value designated by X20 to X2F is 650]
Inputs data used for
square root operation ( )
Converts the input data into a
32-bit floating-point real number ( )
Executes square root
operation ( )
1
2
3
Step Instruction Device
X2F
0
D20
650
X20
BIN
b15
b0
650
FLT
D11 D10
SQR
D1 D0
650 25
.
4951
1
2 3
BCD value
Conversion to
BIN
BIN value
Conversion to
floating-point
SQR
operation

Table of Contents

Related product manuals