522
DEG, DEGP
Program
E
xamp
l
e
(1) The following program converts the angle set by the 4 BCD digits at X20 to X2F to radians, and stores results as 64-bit
floating decimal point type real number at D20 to D23.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X2F designate a value of 120]
: Radian angle to be converted to degrees or head number of the devices where the radian angle is stored (real number)
: Head number of the devices where the value converted in degrees will be stored (real number)
*1:
Applicable for the Universal model QCPU, LCPU.
F
unct
i
on
(1) Converts units of angle size from radian units designated by to angles, and stores result at device number designated
by .
(2) The conversion from radians to angles is performed according to the following equation:
7.12.15 DEG, DEGP
Conversion from floating-point radian to angle
(Single precision)
7.12.15
DEG, DEGP
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
E
Other
Bit
Word
Bit
Word
––
––
*1
––
––
––
*1
––
––
I
nputs
an
ang
l
e
to
be
con
v
erted
i
nto
a
rad
i
an
v
a
l
ue
(
)
.
Con
v
erts
the
con
v
erted
ang
l
e
i
nto
a
rad
i
an
v
a
l
ue
(
)
.
Con
v
erts
the
i
nput
ang
l
e
i
nto
a
6
4-
b
i
t
f
l
oat
i
ng
-
po
i
nt
rea
l
number
(
)
.
1
2
3
Step
I
nstruct
i
on
De
vi
ce
X2
F
BCD
v
a
l
ue
0
D0
1 2 0
X20
Con
v
ers
i
on
to
B
IN
B
IN
b15
b0
B
IN v
a
l
ue
120
Con
v
ers
i
on
to
f
l
oat
i
ng
-
po
i
nt
FLT
D
Con
v
ers
i
on
to
rad
i
an
RADD
D11
120
D10
D13 D12
D21
2
.
09
4
395
···
D20
D23 D22
1
3
2
Basic
Process
High
performance
Redundant Universal
LCPU
Ver.
Command
Command
D
E
GP
DEG
DEGP
D
E
G
S
D
S
D
S
D
S
D
S
D
+1
+1
S
D
S
D
32-bit floating-point
real number
(
32-bit floating-point
real number
(
)rad
Degree
un
i
t
=
Rad
i
an
un
i
t
180