Mitsubishi MELSEC-Q/L Programming Manual page 524

Table of Contents

Advertisement

DEG, DEGP
Program Example
(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]
Step
Instruction
[Operations involved when X20 to X2F designate a value of 120]
Conversion
1
X2F
X20
to BIN
0
1 2 0
BCD value
BIN
7.12.15 DEG, DEGP
Conversion from floating-point radian to angle
(Single precision)
7.12.15
DEG, DEGP
DEG
DEGP
: Radian angle to be converted to degrees or head number of the devices where the radian angle is stored (real number)
S
: Head number of the devices where the value converted in degrees will be stored (real number)
D
Setting
Internal Devices
Data
Bit
Word
––
S
––
D
*1:
Applicable for the Universal model QCPU, LCPU.
Function
(1) Converts units of angle size from radian units designated by
by
.
D
(2) The conversion from radians to angles is performed according to the following equation:
522
Inputs an angle to be converted into a
radian value (
Converts the input angle into a 64-bit
floating-point real number (
Converts the converted angle into a
radian value (
Device
D0
Conversion to
2
D13 D12
b15
b0
floating-point
120
BIN value
FLTD
Command
Command
J
\
R, ZR
Bit
––
––
S
+1
S
(
)rad
32-bit floating-point
real number
Degree unit = Radian unit
).
1
).
2
).
3
Conversion
3
D11
D10
to radian
120
RADD
Ver.
High
Basic
performance
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
DEG
S
DEGP
S
U
\G
Word
to angles, and stores result at device number designated
S
D
+1
D
(
32-bit floating-point
real number
180
D23 D22
D21
D20
2.094395···
Process
LCPU
Redundant Universal
D
D
Constants
Zn
Other
E
*1
––
*1
––
––

Advertisement

Table of Contents
loading

Table of Contents