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

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
|
IN | Input | REAL | The value must be greater than zero. |
LOG | Output | REAL | Logarithm (base 10) of the input value. The returned result is -3.4E+38 for a zero IN value and negative IN value. |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
LOG examples
LOG function block diagram example

LOG ladder diagram example

LOG structured text example

(* ST Equivalence: *) xpos := ABS (xval); xlog := LOG (xpos);
Results

Provide Feedback