beautypg.com

IAI America XSEL-KX User Manual

Page 100

background image




84

Part 4 Commands


 COS (Cosine operation)

Extension condition

(LD, A, O, AB, OB)

Input condition

(I/O, flag)

Command, declaration

Output

(Output, flag)

Command,
declaration

Operand 1

Operand 2

Optional

Optional

COS

Variable

number

Data

ZR

[Function]

Assign the cosine of the data specified in operand 2 to the variable specified in operand 1.
The output will turn ON when the operation result becomes 0.
The setting in operand 1 must be a real variable in a range of 100 to 199, 1100 to 1199, 300
to 399 or 1300 to 1399.
The unit of data in operand 2 is radian.

(Note 1)

Radian = Angle x

π ÷ 180

[Example 1]

COS

100

1.047197

Assign the cosine of 1.047197 (0.5) to variable 100.

[Example 2]

LET

1

100

Assign 100 to variable 1.
60 x

π ÷ 180 (radian)

(60

° will be converted to radian and assigned to

variable 101.)
Assign the cosine of the content of variable 101 (0.5)
to the content of variable 1 (variable 100).

LET

101

60

MULT

101

3.141592

DIV

101

180

COS

*1

*101

This manual is related to the following products: