FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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.
X000
Operation when "120" is specified in X020 to X037
[1]
Conversion
X037 X020
into binary
0
1 2
0
BCD
BIN
value
18.24 FNC136 – RAD / Floating Point Degrees to Radians Conversion
FNC 19
K4X20
D0
BIN
FNC 49
D0
D10
FLT
FNC136
D10
D20
DRAD
END
[2] Conversion into
D0
binary floating point
b15
b0
(real number)
120
Binary
FLT
value
18 Floating Point – FNC110 to FNC139
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]).
[3]
Conversion
D11
D10
into radians
120
DRAD
11
12
13
14
D21
D20
2.094395 ...
15
16
17
18
19
20
551