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

Glossary · PLC and control programming

Counter

Also known as: CTU/CTD counter, Up/down counter

German: Zähler

In IEC 61131-3 programming, a counter is a standard function block that increments or decrements a count value on the rising edge of an input and signals when a preset value is reached; the standard defines up (CTU), down (CTD) and up/down (CTUD) counters.

  • PLC programming
  • Standards

In one sentence

A PLC counter is a standard function block (CTU, CTD, CTUD) that counts rising edges and signals when a preset value is reached.

Example

A CTU counter counts bottles passing a photoelectric sensor and sets its output when 24 bottles have entered the case packer.

How it applies

  • Engineering: Counters count parts, cycles, strokes or events. The count input reacts to a Rising edge, so a signal that stays TRUE is counted only once. Fast signals may need a high-speed counter module, because a normal program cycle can miss pulses shorter than the scan time.
  • Commissioning: Bouncing contacts can produce multiple counts per event; Debounce filtering in hardware or software prevents this. Test the counter at maximum machine speed.
  • Maintenance: Operating counters (strokes, running hours, switching cycles) are a common basis for maintenance intervals and for Diagnostics.
  • Documentation: State what is counted, when the counter resets and whether the value survives a power cycle (Retain variable). Maintenance tables that refer to counted cycles should name the HMI screen where the value can be read.

Counter vs. timer

A counter reacts to events and ignores how much time passes between them. A Timer measures elapsed time. Both are standard function blocks in IEC 61131-3 and often work together, for example to count parts per minute.

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 Blog and are not part of any standard.

Seen a mistake? Send us a note!