5
Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-98
API
Mnemonic Operands
Function
117
D DEG P
Radian
Æ
Degree
Controllers
20PM
10PM
Bit Devices
Word Devices
Program Steps
Type
OP
X Y M S F H
KnX
KnY KnM KnS T
C
D
V
Z
S
*
*
D
*
DDEG, DDEGP: 6 steps
Operands:
S
: Source device (radian)
D
: Conversion result (degree)
Explanations:
1. Use the following formula to convert radian to degree:
Degree
=
Radian
×
(180/
π
)
2. F refers to floating point input. Be sure to add a decimal point when using it.
3. Only 32-bit instructions DDEG and DDEGP are applicable.
5. Flags:
OX
O100
Zero flag
M1808
M1968
Borrow flag
M1809
M1969
Carry flag
M1810
M1970
d) If the absolute value of the result exceeds the max. floating point value, carry flag will be ON.
e) If the absolute value of the result is less than min. floating point value, borrow flag will be ON.
a) If the conversion result is 0, zero flag will be ON
Program Example:
When X0 = ON, convert the radian of the binary floating point in (D1, D0) to degree and save the binary floating
point result in (D11, D10).
X0
DDEG
D0
D10
D 1
D 0
D 11
D 10
binary floating point
Radian value
binary floating point
Degree value (radian x 180/ )
π
Points to note:
For floating point operations, see “5.3 Numeric Values for Data Processing”.
Summary of Contents for DVP-10PM
Page 1: ......
Page 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Page 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Page 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Page 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Page 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Page 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Page 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...