Log base y of x. LOG2(x,y) returns the logarithm base y (operand two) of x (operand one) when successful. If x or y is not positive, LOG2 returns a zero value and BAD status.
Syntax:
'external reference' := LOG2(Real value, Real Value);
Example:
VAR T63; T64; T17; (* Temporary values *) END_VAR; T63 := 0.5; T64 := 15.803; T17 := LOG2(T63, T64);
The above example shows T63 set to the value of 0.5 and T64 set to the value of 15.803. T17 is set to the result of LOG2(T63,T64), which is -3.982123.