Mitsubishi Electric M800VW Series Programming Manual page 414

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.11 Special Function Instructions
 Program example
 The following program seeks the square root of the value set as BCD 4-digit from X20 to X2F and stores the result at D0
and D1 as a 32-bit floating-point real number.
SM400
0
10
[Ladder mode]
Inputs data used for square root
BIN K4X20 D20
operation (1)
Converts the input data into a 32-bit
FLT D20 D10
floating-point real number (2)
Executes square root operation (3)
SQRP D10 D0
END
[Operations when X20 to X2F designate a value of 650]
X2F
X20
(1) Conversion to BIN
0
6
5
0
BCD value
D11
D10
650
32-bit floating-point real number
D20
b15
b0
650
BIN value
BIN
(2) Conversion to
floating-point real number
FLT
(3) SQR
operation
D1
D0
25.4951
SQR
32-bit floating-point real number
393
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
BIN
K4X20
D20
4
FLT
D20
D10
7
SQRP
D10
D0
10
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents