Mitsubishi Electronics FX3G User Manual

Page of 964
529
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
18 Floating Point – FNC110 to FNC139
18.24 FNC136 – RAD / Floating Point Degrees to Radians Conversion
11
FN
C30
-FN
C3
9
R
ota
tion and 
Shi
ft
12
FN
C40-FN
C49
D
ata O
perati
on
13
FNC
50-FNC
59
High-Speed
 
Proc
essing
14
FM
C60-FN
C69
H
andy 
In
struction
15
FN
C70-FN
C79
E
xternal
 F
X
 I/O
 
De
vice
16
FNC
80-FNC
89
External
 FX 
Dev
ice
17
FNC1
00-
FNC10
9
Dat
Transfer 2
18
FNC1
10-
FNC139
Fl
oati
ng Poi
nt
19
FNC14
0-F
N
C
149
Da
ta
 
Operation 2
20
FNC1
50-
FNC159
Pos
itioning 
Control
Program example
In the program example shown below, a 4-digit BCD value set in degrees in X020 to X037 is converted into a binary
floating point value in radians, and stored to D20 and D21 when X000 turns ON.
Operation when "120" is specified in X020 to X037
X000
FNC 49
FLT
D0
Angle to be converted into radians is input ([1]).
The input angle is converted into binary floating
point (real number) ([2]).
The angle is converted from degrees into radians
([3]).
D10
FNC 19
BIN
K4X20
D0
FNC136
DRAD
D10
D20
END
120
1 2
[1]
Conversion
into binary
BIN
120
b15
b0
[2] Conversion into
binary floating point
(real number)
[3]
Conversion
into radians
DRAD
D11
D10
2.094395 ...
D21
D20
FLT
D0
X037 X020
0
0
Binary
value
BCD
value