TAN

TAN, TANP

 

TAN instruction computes the tangent 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

TAN

TANP

S

o

o

o

o

o

-

-

-

-

o

o

o

-

3

o

-

-

D

o

-

o

o

o

-

-

-

-

o

o

o

-

 

When enabled, the TAN instruction computes the tangent 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 save its values to D100.

The TAN instruction calculates the tangent of Radian value D100 and save its values to D200.