18 Applied Instructions (Floating Point)
18.25 DDEG / Floating Point Radians to Degrees Conversion
495
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
Program example
This is a program for converting the radian value set in binary floating decimal point in D20, D21 to the angle
when the X000 is ON, and issuing to the Y040 to Y057 in BCD value.
Operation when the value of D20, D21 is 1.435792.
[Structured ladder/FBD]
X000
D0
DDEG
EN
s
ENO
BCD
EN
s
ENO
d
d
K4Y40
[ST]
DDEG(X000,D20,D10);
INT(X000,D10,D0);
BCD(X000,D0,K4Y40);
INT
EN
s
ENO
d
D0
D20
D10
D10
Radial value is converted to angle. (1))
Angle of binary floating decimal point (real number)
is converted to integer. (2))
The converted integer value is issued
to the display unit. (3))
1) Angle
conversion
DDEG
0 8
Y057 Y040
0 2
Value of binary floating
decimal point (real number)
Value of binary floating
decimal point (real number)
1.435792
D21 D20
3) BCD
conversion
BCD
82.26482
D11 D10
82
b15 b0
D0
BIN value
2) BIN
conversion
INT BCD value