beautypg.com

Chapter 4. programming – IAI America S-SEL-E User Manual

Page 154

background image

Page 149

2-9 Functional Commands

SIN (Sine)

Chapter 4. Programming

COS (Cosine)

[Function]

Stores the sine (SIN) of the data in Operand 2 in the variable in Operand 1. Stores the sine of the contents in the

variable in Operand 2 in the Operand 1 variable. If there is a post instruction (flag, output port), it turns ON
when the computation result is zero. (Be sure to input a real number variable 100~199 in Operand 1. This is the
same when placing a variable no. in Operand 2. The data in Operand 2 must be expressed in radians instead of
as an angle (degrees). A maximum of 7 digits can be input for the floating point.)

[Example]

SIN

100

0.988031

SIN 0.988031 (radian) is 0.5, and after performing the command, variable 100 becomes 0.5.

SIN

100

*101

When the content of variable*101 in Operand 2 is 0.988031 (radian), then SIN 0.988031 (radian)
becomes 0.5, and after performing the command, variable 100 becomes 0.5.

*180° =

π

(rad), 90° = 1/2

π

(rad)

*Angle x

π

÷ 180 = radian

E x p a n s io n

c o n d itio n

( A N D · O R )

In p u t

c o n d itio n

( I/O · F la g )

C o m m a n d

P o s t

( O u tp u t p o r t · F la g )

C o m m a n d

O p e r a n d 1

O p e r a n d 2

O p tio n a l

O p tio n a l

S IN

V a r ia b le n o .

D a ta ·V a r ia b le n o .

O p tio n a l

E x p a n s io n

c o n d itio n

( A N D · O R )

In p u t

c o n d itio n

( I/O · F la g )

C o m m a n d

P o s t

( O u tp u t p o r t · F la g )

C o m m a n d

O p e r a n d 1

O p e r a n d 2

O p tio n a l

O p tio n a l

C O S

V a r ia b le n o .

D a ta ·V a r ia b le n o .

O p tio n a l

[Function]

Stores the cosine (COS) of the data in Operand 2 in the variable in Operand 1. Stores the cosine of the contents

in the variable in Operand 2 in the Operand 1 variable. If there is a post instruction (flag, output port), it turns
ON when the computation result is zero. (Be sure to input a real number variable 100~199 in Operand 1. This
is the same when placing a variable no. in Operand 2. The data in Operand 2 must be expressed in radians
instead of as an angle (degrees). A maximum of 7 digits can be input for the floating point.)

[Example]

COS

100

1.047197

COS 1.047197 (radian) is 0.5, and after performing the command, variable 100 becomes 0.5.

COS

100

*101

When the content of variable*101 in Operand 2 is 1.047197 (radian), then COS 1.047197 (radian)
becomes 0.5, and after performing the command, variable 100 becomes 0.5.

This manual is related to the following products: