COS

COS, COSP

 

COS instruction computes the cosine of source and saves the result in the Destination.

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

 

S

Radian source

D

Destination

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

COS

COSP

S

o

o

o

o

o

-

-

-

-

o

o

o

-

3

o

-

-

D

o

-

o

o

o

-

-

-

-

o

o

o

-

 

When enabled, the COS instruction computes the cosine of Radian value and saves the result in Destination.

 

 

  • The degree of source is set to Radian (degree x /180)

(Please refer to RAD or DEG instruction for more details)

 

Example)

If M00 is ON, the degree value D70 is saved in D80.

The RAD instruction converts float value D90 to the Radian value and saves its value to D100.

The COS instruction calculates the cosine of Radian value D100 and saves its value to D200.