CODESYS LN

LN is an IEC operator that calculates the natural logarithm of a numeric input. It accepts any numeric basic data type as input and returns a REAL or LREAL result. For example, LN(45) yields approximately 3.80666.

Source checked2/2 values · 2026-10-26

Specification

2 sources
Languageiec 61131 3
CodeLN
DialectCODESYS

Study notes

  • Permitted input data types: any numeric basic data type.
  • Permitted output data types: REAL and LREAL.
  • Example in ST: q := LN(45); returns 3.80666.
↑↓ navigate↵ openesc close