Mitsubishi Electric MELSEC FX3U Programming Manual page 549

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Program example
In the program example shown below, the COS
calculated, and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
X000
Operation when "0.5" is stored in D0 and D1
D1
D0
0.5
Binary floating point
(real number) value
D21
D20
60
Binary floating point
(real number) value
−1
FNC134
D0
D10
DACOS
FNC137
D10
D20
DDEG
FNC129
D20
D30
INT
FNC 18
D30
K4Y40
BCD
END
[1]
Conversion
−1
by COS
D11
operation
1.047198
Binary floating point
DACOS
(real number) value
[2] Conversion into degrees
[3]
D30
Conversion
b15
b0
into binary
operation
60
Binary
INT
value
18 Floating Point – FNC110 to FNC139
18.22 FNC134 – ACOS / Floating Point Arc Cosine
value of data (binary floating point) stored in D0 and D1 is
The angle (in radians) is calculated by the COS
operation ([1]).
The value in radians is converted into the value in
degrees ([2]).
The angle expressed in the binary floating point (real
number) is converted into an integer (binary) ([3]).
The angle expressed in integer (binary) is output to
the display unit ([4]).
D10
DDEG
[4] BCD
Y057 Y040
0 0 6 0
BCD
BCD
value
11
−1
12
13
14
15
16
17
18
19
20
547

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents