COS (cosine)
The COS instruction calculates the cosine of a Real value.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
COS

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
|
IN | Input | REAL | Any Real value. |
COS | Output | REAL | Cosine of the input value (in set [-1.0 .. +1.0]). |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
COS examples
COS function block diagram example

COS ladder diagram example

COS structured text example

(* ST Equivalence: *) cosine := COS (angle); result := ACOS (cosine); (* result is equal to angle *)
Results

Provide Feedback