Mitsubishi Electric M800VW Series Programming Manual page 380

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 conducts a COS operation on the angle 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
BIN K4X20 D30
0
FLT D30 D20
RAD D20 D10
COS D10 D0
13
X2F............... X20
0
0
6
BCD value
D21
60
32-bit floating-point real
number
[Ladder mode]
Inputs an angle used for COS operation (1).
Converts the input angle into a 32-bit
floating-point real number (2).
Converts the converted angle into a radian value
(3).
Executes COS operation using the
converted radian value (4).
END
[Operations when X20 to X2F designate a value of 60]
D30
(1) Conversion to BIN
b15......b0
0
BIN value
BIN
(2) Conversion to floating-point
real number
FLT
(3) Conversion to radian value
D11
D20
1.047198
32-bit floating-point real
RAD
number
60
(4) COS operation
D
1
0
COS
32-bit floating-point real
number
359
[List mode]
Steps
Inst.
Device
0
LD
SM400
1
BIN
K4X20
D30
4
FLT
D30
D20
7
RAD
D20
D10
10
COS
D10
D0
13
END
D1
D
0
0.500000
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents