Glossary · PLC and control programming
Organization block (OB)
Also known as: OB
German: Organisationsbaustein
In Siemens STEP 7 and TIA Portal programming, an organization block (OB) is a block called by the controller's operating system that forms the interface between the operating system and the user program, for example for the main program cycle, startup, time-driven interrupts and error handling.
- PLC programming
- Vendor product
In one sentence
In Siemens PLCs, organization blocks (OBs) are called by the operating system and start the user program for cycles, startup and events.
Example
A Siemens program runs its main logic in the program cycle OB, initializes data in a startup OB and handles module failures in a diagnostic error OB.
How it applies
- Engineering: OBs are Siemens' equivalent of tasks in IEC 61131-3 terms. Each OB type has a trigger (cycle, startup, time, hardware event, error) and a priority. The user program is called from the OBs; functions and function blocks never run on their own.
- Fault handling: Whether the controller stops or continues after certain errors depends on which error OBs exist and what they do. On some controller generations, a missing error OB leads to a stop; on others the behavior differs. This must be a deliberate design decision.
- Commissioning: The load of time-driven interrupt OBs affects the cycle time of the main program. Check it under full load.
- Documentation: The software documentation should list the OBs used, their triggers, priorities and what each one calls. For error OBs, document the intended Fault reaction.
Organization block vs. task
IEC 61131-3 assigns programs to configurable tasks. Siemens uses predefined OB types with numbers and events. Conceptually, both decide when which part of the program runs.
Keep in mind: product names and features change. Check OB types, numbers and behavior against the vendor's current documentation for the controller family used.