Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G ユーザーズマニュアル

ページ / 936
525
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
18 Floating Point – FNC110 to FNC139
18.23 FNC135 – ATAN / Floating Point Arc Tangent
11
FN
C
30
-FN
C
39
R
otati
on and 
Shi
ft
12
FNC4
0-F
NC4
9
D
ata O
per
ati
on
13
FN
C
50-FN
C
59
H
igh S
pe
ed 
P
rocessing
14
FM
C
60-FN
C
69
H
andy 
In
st
ru
ct
ion
15
FNC7
0-F
NC7
9
Ex
ter
nal FX
 I/O
 
D
evice
16
FN
C
80-FN
C
89
Ext
ernal
 FX 
De
vic
e
17
FN
C
100-
FN
C
10
9
Da
ta
 
Transf
er 2
18
FN
C
110-
FN
C
139
Floati
ng Poi
nt
19
FN
C
14
0-F
N
C
149
Da
ta
 
O
per
at
ion 2
20
FN
C
150-
FN
C
159
Posit
ioning 
C
ont
ro
l
Program example
In the program example shown below, the TAN
−1
 value of data (binary floating point) stored in D0 and D1 is
calculated, and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
Operation when "1" is stored in D0 and D1
The angle expressed in binary floating point (real
number) is converted into an integer (binary) ([3]).
X000
FNC137
DDEG
D10
The angle (in radians) is calculated by the TAN
−1
operation ([1]).
The value in radians is converted into the value in
degrees ([2]).
D20
FNC135
DATAN
D0
D10
FNC129
INT
D20
D30
The angle expressed in integer (binary) is output to
the display unit ([4]).
FNC 18
BCD
D30
K4Y40
END
Binary floating point
(real number) value
 1
D1
D0
[1]
Conversion
by TAN
−1
operation
Binary floating point
(real number) value
0.785398
D11
D10
DATAN
Binary floating point
(real number) value
45
D21
D20
[3]
Conversion
into binary
45
b15
b0
D30
Binary
value
[4] BCD
operation
BCD
0 0 4 5
Y057 Y040
BCD
value
DDEG
[2] Conversion into degrees
INT