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

Glossary · Automation software engineering and architecture

Interrupt service routine (ISR)

Also known as: ISR, Interrupt handler

German: Interrupt-Service-Routine (ISR)

In embedded and real-time systems, an interrupt service routine (ISR) is a function that the processor executes in response to a hardware or software interrupt, temporarily suspending the running code to handle an urgent event, such as a timer tick, a received message or an input signal change.

  • Software engineering

In one sentence

An interrupt service routine is code the processor runs in response to an interrupt, suspending normal code to handle an urgent event.

Example

When the encoder index pulse arrives, an ISR latches the current position counter within microseconds and signals the motion task to process it.

How it applies

  • Engineering: Keep ISRs short: capture the data, acknowledge the interrupt and hand further processing to a task, for example through a Circular buffer or flag. Long ISRs delay other interrupts and tasks and increase jitter.
  • Concurrency: Data shared between an ISR and normal code needs protection, such as atomic access or briefly disabling interrupts. Many functions, like memory allocation or blocking calls, must not be used in ISRs.
  • Documentation: Document which interrupts are used, their priorities, what each ISR does and its maximum execution time. In PLC environments, hardware interrupt tasks play a similar role and should be documented in the task configuration.

ISR vs. event task

An ISR runs at interrupt level, directly triggered by hardware, with strict restrictions. An event task in a PLC runtime or real-time operating system is scheduled as a normal task after the event and can use more functions, with a slightly longer reaction time. See Event-triggered execution.

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

Source: AI TechDoc Blog editorial definition, based on embedded and real-time systems practice

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!