Natural log of x. LN (x). Returns the natural logarithm of x (operand one) when successful. If x is not positive, LN returns a zero value and BAD status.
Syntax:
'external reference' := LN(Real value);
Example:
VAR T63; T64; T17; T18; (* Temporary values *) END_VAR; T63 := .5; T64 := 15.803; T17 := LN(T63); T18 := LN(T64);
The above example shows T63 set to the value of .5 and T64 set to the value of 15.803. T17 is set to the result of LN(T63), which is -0.6931471805599 and T18 is set to the result of LN(T64), which is 2.760199795427.