Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · PLC and control programming

Function (IEC 61131-3)

Also known as: FUNCTION, FC

German: Funktion

In IEC 61131-3, a function is a program organization unit that, when executed with the same input values, always returns the same result and has no internal state stored between calls.

  • PLC programming
  • Standards

In one sentence

An IEC 61131-3 function is a program unit without memory between calls: the same inputs always give the same result.

Example

A function ScaleAnalog converts a raw input value from 0 to 27648 into a temperature from 0 to 150 °C.

How it applies

  • Engineering: Functions suit calculations and conversions: scaling, limits, unit conversions, checksums. IEC 61131-3 also defines standard functions such as ADD, MAX, SEL or type conversions. Because a function keeps no state, it can be called anywhere without creating an instance.
  • Testing: The lack of internal state makes functions easy to unit-test: a table of inputs and expected outputs is enough.
  • Vendor terms: In Siemens environments, the equivalent block is called FC. Some tools allow functions to access global data, which weakens the no-state rule; coding guidelines usually forbid this.
  • Documentation: Document each library function with purpose, inputs, output, units, valid ranges and behavior at limits. This reference information maps well to a DITA reference topic.

Function vs. function block

A function has no memory: it returns a result computed from its inputs. A Function block (FB) has an instance with internal data kept between calls, so it can implement timers, counters or state machines.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: IEC 61131-3, Programmable controllers — Part 3: Programming languages

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!