Resolving CFC Compiler Warning 'Blocks Not Installed in Interrupt OBs' in SIMATIC PCS 7 - OB1 vs Cyclic OB35 Execution
The CFC compiler warning 'Blocks not installed in interrupt OBs' occurs in SIMATIC PCS 7 when newly added function blocks are assigned to execute within the non-interrupt background organization block OB1 rather than cyclic interrupt tasks (OB30 to OB38, such as OB35 at 100ms). While downloading a program with this warning will not stop the CPU, it introduces severe operational hazards in process automation. Standard PCS 7 blocks—including timers (TimerP), totalizers, ramp generators, and PID controllers (PIDConL)—rely on an exact, fixed sampling time (SampleTime) initialized from the cyclic interrupt OB. Running in OB1 causes calculation drift, erratic timer durations, and inconsistent PID loop tuning as CPU cycle time fluctuates. Resolving the warning requires opening the CFC Run Sequence Editor (Ctrl+F5) and moving the affected runtime groups into a deterministic cyclic interrupt OB (e.g., OB35).
Table of Contents
- Deterministic Execution in Process Automation: Cyclic Interrupt OBs vs OB1
- Technical Impact of OB1 Execution on SampleTime and Algorithm Accuracy
- Step-by-Step Procedure to Move Runtime Groups to Cyclic Interrupt OBs
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Deterministic Execution in Process Automation: Cyclic Interrupt OBs vs OB1
In industrial process control, algorithmic determinism is a fundamental design requirement. Unlike factory automation machines that often execute logical interlocks in a continuous, free-wheeling cycle (Organization Block 1 / OB1), process control algorithms require strictly defined time intervals. Control loops rely on calculus-based mathematics (derivatives, integrals, lag filters) that assume time ($dt$) is constant between successive execution sweeps.
In SIMATIC S7-400 controllers operating under SIMATIC PCS 7, Organization Blocks OB30 through OB38 provide hardware-timed cyclic interrupt execution (e.g., OB32 at 20ms, OB35 at 100ms, OB36 at 50ms, OB38 at 1s). The CPU operating system guarantees that these interrupt blocks execute at their assigned interval with microsecond precision, interrupting OB1 whenever their timer expires. In contrast, OB1 execution time stretches and contracts based on communication loads, operator faceplate queries, and background diagnostics.
Technical Impact of OB1 Execution on SampleTime and Algorithm Accuracy
When a block from the Advanced Process Library (APL) is compiled, the compiler inspects its container OB and automatically initializes the block's SampleTime parameter with the OB cycle duration.
PIDConL)TimerP)TotalL)RampP)Pcs7AnIn)If blocks execute in OB1, SampleTime is assigned the default configuration value or estimated average. As CPU loading increases during an alarm flood or engineering upload, OB1 execution slows down, corrupting all time-based calculations.
Step-by-Step Procedure to Move Runtime Groups to Cyclic Interrupt OBs
To resolve the compiler warning and enforce deterministic execution, follow this procedure in the CFC Editor:
- Open the Run Sequence Editor: In the CFC Editor, select
Options -> Edit Run Sequenceor press the keyboard shortcutCtrl+F5. - Locate the Erroneous Runtime Group: In the left tree view, expand
OB1. Locate the runtime group containing the newly created chart blocks. - Select the Target Cyclic OB: In standard PCS 7 plants, 100ms cyclic control logic is executed in OB35. If the blocks are high-speed loops (e.g., turbine pressure control), select OB32 (20ms); if slow thermal processes, select OB36 (500ms) or OB38 (1s).
- Relocate via Drag and Drop: Click and drag the runtime group from
OB1into the target cyclic OB (e.g.,OB35). Position the group logically relative to upstream measurement drivers and downstream actuator drivers. - Update Insertion Pointer: Right-click the newly positioned runtime group and select
Predecessor for Insertion Positionif subsequent blocks should automatically insert into this group. - Recompile the S7 Program: In SIMATIC Manager, right-click the
Chartsfolder, selectCompile -> Scope: Changes Only, and verify that the compiler warning disappears.
Verification
Verify proper task execution and deterministic sampling using these checks:
- CFC Compiler Log Check: Execute a compilation of the charts. Verify in the compile log window that
0 Warningsand0 Errorsare reported regarding interrupt OB installation. - Block Pin SampleTime Audit: Open the CFC chart online. Inspect the
SampleTimeinput pin on the PID controller or timer block. Verify thatSampleTimereads0.1(representing 100ms for OB35). - CPU Module Information Inspection: In SIMATIC Manager, select the CPU and press
Ctrl+D. Open theCycle TimeandTime Systemtabs. Confirm that OB35 execution times remain comfortably within its 100ms sampling budget.
Limitations and Operational Precautions
When allocating blocks across cyclic interrupt OBs, observe these operational safeguards:
- Cyclic Task Overload: Placing too many complex mathematical blocks into a high-speed OB (e.g., OB32 at 20ms) can cause task overruns, triggering Organization Block 80 (OB80 - Time Error). Ensure total execution time of all blocks in an OB does not exceed 70% of its sampling interval.
- Chart-Oriented Runtime Groups: In PCS 7 V8.1 and later, enable 'Chart-oriented runtime group management' in chart properties to prevent blocks from inadvertently defaulting into OB1 during chart creation.
- Module Driver Integrity: The PCS 7 Driver Generator automatically places module diagnostic drivers into interrupt OBs (OB82, OB83, OB86). Never manually alter the runtime sequence of
@-prefixed system runtime groups.
Engineer FAQ
Why did CFC put my new blocks into OB1 in the first place?
CFC places new blocks into whichever runtime group is designated as the active 'Predecessor for Insertion Position'. If the insertion pointer was accidentally set to OB1 or if a non-PCS7 block was imported, the editor defaults to OB1.
Can I download the change to OB35 without stopping the controller?
Yes. Moving runtime groups between organization blocks in the CFC Run Sequence Editor can be compiled and downloaded in RUN mode using standard delta download ('Changes Only').
Is OB1 ever used in SIMATIC PCS 7?
In standard PCS 7 applications, OB1 is essentially unused. Almost all technological logic executes inside cyclic interrupt OBs (OB30 to OB38) or asynchronous event OBs (OB8x). Leaving OB1 empty ensures maximum CPU availability for cyclic tasks and communications.
Technical References
- SIMATIC PCS 7 CFC for S7 / M7 Engineering Manual (A5E36173004)
- SIMATIC Fault-Tolerant Systems S7-400H System Manual (A5E00267842)
- Siemens Industry Online Support: 'How do you structure runtime groups in SIMATIC PCS 7?' (Entry ID: 109742472)
Related Articles
- Understanding Chart-Based Runtime Group Management in SIMATIC PCS 7 - Folder Colors and Execution Organization.md
- Troubleshooting Unexpected Execution Reordering in CFC Runtime Groups - Data Flow Optimization and Sequence Locking.md
- Evaluating Continuous Function Chart (CFC) Architecture - DCS Engineering Advantages vs Classic PLC Programming.md
Related Tags
- OB1
- OB35
- SampleTime
- Run Sequence
- CFC Compiler Warning
- Cyclic Interrupts