524
DEGD, DEGDP
F
unct
i
on
(1) The unit expressing the size of an angle is converted into the degree unit from the radian unit specified by , and its
result is stored into the device specified by .
(2) The conversion from radians to angles is performed according to the following equation:
(3) When the operation results in -0 or an underflow, the result is processed as 0.
Operat
i
on
E
rror
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Program
E
xamp
l
e
(1) The following program converts the radian value set with 64-bit floating decimal point type real number at D20 to D23 to
angles, and stores the result as a BCD value at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when the values at D20 to D23 are 1.435792]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4140
The specified device value is not within the following range:
0, 2
-1022
| Specified device value | < 2
1024
The specified device value is -0.
––
––
––
––
4141
The operation result exceeds the following range (when an overflow
occurs):
2
1024
| Operation result |
––
––
––
––
S
D
(
)rad
(
)
+
3
S
+
2
S
S
+
1
S
+
3
D
+
2
D
D
+
1
D
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
Degree
un
i
t
=
Rad
i
an
un
i
t
180
Con
v
erts
the
ang
l
e
i
n
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
i
nto
an
i
nteger
(
)
.
Outputs
the
con
v
erted
i
nteger
to
a
d
i
sp
l
ay
de
vi
ce
(
)
.
Con
v
erts
a
rad
i
an
v
a
l
ue
i
nto
an
ang
l
e
(
)
.
1
2
3
Step
I
nstruct
i
on
De
vi
ce
Con
v
ers
i
on
to
ang
l
e
D
E
GD
BCD
operat
i
on
BCD
Con
v
ers
i
on
to
B
IN
INT
D
D0
b15
b0
B
IN v
a
l
ue
82
Y4F
BCD
v
a
l
ue
0 0 8 2
Y4
0
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
D21
1
.4
35792
D20
D23 D22
D11
82
.
26
4
82
D10
D13 D12
1
2
3