E L C P r o g r a m m i n g M a n u a l
F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
M N 0 5 0 0 3 0 0 3 E
3 - 2 9 8
API Mnemonic
Operands
Function
117
D DEG P
S, D
Radian
Æ
Degree
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
S
*
*
*
D
*
DDEG, DDEGP: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32
16
P
32 16
P
Operands:
S
: data source (radians)
D
: Destination result (degrees)
Description:
1.
This instruction uses the following formula to convert radians to degrees:
Degrees
=
Radians
×
(180/
π
)
2.
Flags: M1020 Zero flag, M1021 Borrow flag and M1022 Carry flag.
If the absolute value of the result is larger than the maximum floating point value, the carry flag
M1022= ON.
If absolute value of the results is less than the minimum floating point value, the borrow flag
M1021= ON.
If the conversion result is 0, zero flag M1020= ON.
Program Example:
When X0= ON, convert the degrees value of the binary floating point in D1/D0 to radians and save
the result in D11/D10 The result is binary floating point
.
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/ )
π
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...