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

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

COS_LREAL ladder diagram example

COS_LREAL structured text example

(* ST Equivalence: *) cosine := COS_LREAL (angle); result := ACOS_LREAL (cosine); (* result is equal to angle *)
Results

Provide Feedback