DEG

DEG, DEGP

 

DEG instruction converts Radian value to degrees and saves the result to the Destination.

(It supports only in XP and PLC-S CPU series)

 

S

Radian source

D

Destination in degrees

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

DEG

DEGP

S

o

o

o

o

o

-

-

-

-

o

o

o

-

3

o

-

-

D

o

-

o

o

o

-

-

-

-

o

o

o

-

 

When enabled, the DEG instruction computes the radian source and saves the result in Destination (in degrees).

 

 

  • The Degree formula : Radian value x (180/)

 

Example)

If M00 is ON, the DEG instruction converts D100 (Radian value) to Degree value and saves its result to D90.

The INT instruction converts D90 (Float value) to integer value and saves its result in D80.