Mitsubishi Electric MELSEC FX3U Programming Manual page 551

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 TAN
calculated, and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
X000
Operation when "1" is stored in D0 and D1
D1
D0
1
Binary floating point
(real number) value
D21
D20
45
Binary floating point
(real number) value
−1
value of data (binary floating point) stored in D0 and D1 is
FNC135
D0
D10
DATAN
FNC137
D10
D20
DDEG
FNC129
D20
D30
INT
FNC 18
D30
K4Y40
BCD
END
[1]
Conversion
−1
by TAN
D11
operation
0.785398
Binary floating point
DATAN
(real number) value
[2] Conversion into degrees
[3]
D30
Conversion
b15
b0
into binary
operation
45
Binary
INT
value
18 Floating Point – FNC110 to FNC139
18.23 FNC135 – ATAN / Floating Point Arc Tangent
The angle (in radians) is calculated by the TAN
operation ([1]).
The value in radians is converted into the value in
degrees ([2]).
The angle expressed in 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 4 5
BCD
BCD
value
11
−1
12
13
14
15
16
17
18
19
20
549

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents