3 cosine instruction (cos) – Yaskawa MP900 Series Machine Controller New Ladder Editor User Manual
Page 98

1 Ladder Program Instructions
1.5.3 COSINE Instruction (COS)
1-88
Program Example
Integer Type Data
Input X
= 30 degrees (MW00100 = 30
∗
100
= 3000)
Output SIN (X)
= 0.50 (MW00102 = 0.50
∗
10000
= 5000)
Real Number Type Data
1.5.3 COSINE Instruction (COS)
Outline
The COS instruction calculates the cosine of integer or real number values as the operation
result.
The input units and output results for integer and real number values are different. This
instruction cannot be used for double-length integer data.
Integer Type Data
This instruction can be used between -327.68 and 327.67 degrees. The Source is used as the
input (1
= 0.01 degrees) and the operation result is stored in the Dest. Upon output, the oper-
ation result is multiplied by 10,000. If a value outside the range of -327.68 to 327.67 is
entered, the correct result is obtained. For example, if 360.00 is entered, -295.36 degrees is
output as a result.
Real Number Type Data
The Source is used as the input (unit
= degrees) and the cosine of the input is stored in the
Dest.