Resolving CFC Compiler Warning 'Blocks Not Installed in Interrupt OBs' in SIMATIC PCS 7 - OB1 vs Cyclic OB35 Execution

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

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.

Block Type / FunctionExecution in Cyclic OB (OB35 / 100ms)Erroneous Execution in OB1 (Free-wheeling)PID Controller (PIDConL)Perfect mathematical integration ($I = I + e \cdot dt / T_i$)Integral windup or lagging response as scan time fluctuates (15ms to 80ms)Timer Blocks (TimerP)Elapsed time increments accurately every 100msTimer runs faster or slower than real-world wall clock timeTotalizer (TotalL)Exact mass/volume integration based on flow rateSevere accounting errors in accumulated production volumeRamp Generator (RampP)Smooth linear setpoint transitioningStepped, jerky transitions causing valve hunting and process spikesChannel Drivers (Pcs7AnIn)Flutter suppression and smoothing filter calculate accuratelyFilter time constants distorted by variable scan intervals

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:

  1. Open the Run Sequence Editor: In the CFC Editor, select Options -> Edit Run Sequence or press the keyboard shortcut Ctrl+F5.
  2. Locate the Erroneous Runtime Group: In the left tree view, expand OB1. Locate the runtime group containing the newly created chart blocks.
  3. 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).
  4. Relocate via Drag and Drop: Click and drag the runtime group from OB1 into the target cyclic OB (e.g., OB35). Position the group logically relative to upstream measurement drivers and downstream actuator drivers.
  5. Update Insertion Pointer: Right-click the newly positioned runtime group and select Predecessor for Insertion Position if subsequent blocks should automatically insert into this group.
  6. Recompile the S7 Program: In SIMATIC Manager, right-click the Charts folder, select Compile -> Scope: Changes Only, and verify that the compiler warning disappears.

Verification

Verify proper task execution and deterministic sampling using these checks:

  1. CFC Compiler Log Check: Execute a compilation of the charts. Verify in the compile log window that 0 Warnings and 0 Errors are reported regarding interrupt OB installation.
  2. Block Pin SampleTime Audit: Open the CFC chart online. Inspect the SampleTime input pin on the PID controller or timer block. Verify that SampleTime reads 0.1 (representing 100ms for OB35).
  3. CPU Module Information Inspection: In SIMATIC Manager, select the CPU and press Ctrl+D. Open the Cycle Time and Time System tabs. 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

Related Articles

Related Tags

  • OB1
  • OB35
  • SampleTime
  • Run Sequence
  • CFC Compiler Warning
  • Cyclic Interrupts
6 respuestas