Attention

IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.

LOG

Returns the base-10 logarithm of a numeric input.

IEC 61131-3

Section 2.5.1.5.2

Support

Not yet supported

Signatures

#

Input (IN)

Return Type

Support

1

REAL

REAL

Not yet supported

2

LREAL

LREAL

Not yet supported

Description

Returns the common logarithm (base 10) of IN. The input must be positive; the result of LOG applied to zero or a negative value is undefined.

Example

result := LOG(REAL#100.0);  (* result = 2.0 *)
value := LOG(LREAL#1000.0); (* value = 3.0 *)

See Also

  • LN — natural logarithm

  • EXP — natural exponential