Mitsubishi Electric MELSEC-Q/L Programming Manual page 635

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

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 64-bit floating decimal point type real number at D0 to D3.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when value designated by X20 to X2F is 650]
1
Conversion to
X2F
X20
b15
BIN
0
6 5 0
BIN
BCD value
BIN value
Inputs data used for square root
operation (
Converts the input data into a 64-bit
floating-point real number (
Executes square root operation (
Device
2
D20
Conversion to
D13 D12
b0
floating-point
650
FLTD
).
1
).
2
).
3
3
SQR
D3
D11
D10
operation
650
SQRD
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
D2
D1
D0
25.4951
7
633

Advertisement

Table of Contents
loading

Table of Contents