BLOG / PLC

Organization Blocks on S7-1500: Which OB Runs When, and What Belongs Where

09 Nisan 2020 S7-1500OBProgram StructureTIA Portal

The OB list looks like a menu; it is actually the machine’s scheduling contract. Knowing which OB runs when is the difference between a program and a pile of logic.

The everyday set

OB1 is the free-running cycle — machine coordination, sequences, interlocks. Cyclic interrupt OBs (OB30–38) run at fixed intervals regardless of OB1’s mood: closed-loop control (PID at a steady sample time), signal filtering, anything that hates jitter. Time-of-day and time-delay OBs cover scheduling. Hardware interrupt OBs (OB40s) respond to configured input edges in microseconds-to-milliseconds — registration marks, fast reject gates.

The insurance set

Error OBs decide whether a fault stops the CPU: without OB82 (diagnostic interrupt), OB83 (module pulled), OB86 (rack/station failure) and OB121/122 (programming/access errors) present, the CPU goes to STOP on the corresponding event. Present-but-empty OBs keep the CPU running — the minimum is their presence plus logging; the proper version evaluates the event and degrades gracefully (an IO station loss stops its zone, not the plant).

Placement rules we enforce: nothing slow inside interrupt OBs (no loops over arrays, no string work); PID sample time = the OB interval it lives in, always; cross-OB data through defined interfaces, not shared scribble bits — an OB35 control loop and OB1 sequence sharing flags without discipline is the classic random-behavior generator.

FAQ

How fast can cyclic interrupts go? Down to 500 µs or faster on 1500s, but budget it: measure execution time and keep comfortable headroom inside the interval.

Do empty error OBs hide problems? They convert STOPs into silence — that is why “empty” must still mean “logged and alarmed”. Hidden diagnostics are future downtime.


Zone Otomasyon structures PLC programs so the scheduling is visible and defensible. Our programming standards.