SIN¶
Returns the sine of an angle in radians.
Signature¶
┌─────────┐
IN ─┤ SIN ├─ OUT
└─────────┘
FUNCTION SIN : ANY_REAL
VAR_INPUT
IN : ANY_REAL;
END_VAR
END_FUNCTION
The return type matches the input type. SIN accepts REAL,
LREAL.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Angle in radians. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
The sine of IN, in the range [-1.0, 1.0]. Same type as IN. |
Description¶
Returns the sine of IN, where IN is an angle expressed in radians. The result is in the range [-1.0, 1.0].
Example¶
result := SIN(REAL#0.0); (* result = 0.0 *)
value := SIN(LREAL#1.5707963); (* value ~ 1.0 *)
See Also¶
References¶
IEC 61131-3 §2.5.1.5.2