Investigating APL Trigger Block Installation Omissions in Cyclic Tasks (OB3x vs OB100) in PCS 7 V8.1

Investigating APL Trigger Block Installation Omissions in Cyclic Tasks (OB3x vs OB100) in PCS 7 V8.1

In SIMATIC PCS 7 V8.1, copying an Advanced Process Library (APL) block with startup characteristics—such as the Trigger block FB1821—can sometimes result in the copied block being inserted exclusively into OB100 while omitting cyclic execution tasks (OB3x such as OB35). This anomaly stems from either inadvertently setting the 'Predecessor for insert position' to an OB100 runtime group or a known CFC compiler defect under Chart-based Insertion. To resolve this, ensure the insertion predecessor is explicitly set to the desired cyclic OB (e.g. OB35), install CFC V8.1 SP1 Update 6 (which officially fixes this omission bug), and audit the block's runtime assignments in the Runtime Editor.

Table of Contents

Executive Summary

In SIMATIC PCS 7 V8.1, the Continuous Function Chart (CFC) editor manages the automatic assignment of function blocks into controller execution tasks (Organization Blocks). For blocks that require initial state evaluation during controller restart (such as Trigger block FB1821, TimerP, or technological blocks like MotL), the block must be installed in both a cyclic interrupt OB (e.g. OB35) and the startup organization block (OB100). During commissioning, automation engineers frequently observe a perplexing behavior: copying and pasting a Trigger block causes the clone to be inserted exclusively into OB100, while omitting cyclic execution entirely. Because standard consistency checks do not generate fatal errors for blocks executing solely in OB100, the block appears dead in runtime. This technical article details the mechanics of task list insertion, explains the CFC V8.1 SP1 defect, and presents verified remediations.

APL Block Startup Architecture: The s7_tasklist Attribute and OB100

In SIMATIC STEP 7 and PCS 7, function block type headers contain system attributes that govern automated scheduling:

  • The s7_tasklist Attribute: For blocks requiring startup initialization, the block type header specifies s7_tasklist = 'OB100'.
  • Dual Task Placement: When such a block is dragged from a library into a CFC chart, the CFC editor creates two distinct runtime calls:
    1. A cyclic runtime group entry in the active cyclic interrupt task (e.g. OB35 running every 100 ms) for continuous algorithmic evaluation.
    2. An initialization entry in OB100 executed once during CPU warm restart to initialize internal state registers, reset edge flags, and prevent false alarms.
  • Both calls reference the exact same instance data block (DB).

Root Cause 1: Predecessor for Insert Position Misassignment

The most frequent human engineering cause involves the Predecessor for insert position pointer:

  • In CFC, right-clicking any block and selecting Predecessor for insert position determines where the next dragged or pasted block is scheduled.
  • For dual-task blocks, the context menu displays multiple insertion targets:
  • OB35\<CFC_Chart_Name> (Cyclic Execution Group)
  • OB100\<CFC_Chart_Name> (Startup Group)
  • If an engineer inadvertently selects the OB100 option as the predecessor, all subsequent copied blocks are inserted strictly into the OB100 runtime group, completely bypassing cyclic OBs.

Root Cause 2: CFC V8.1 SP1 Compiler Defect under Chart-Based Insertion

In PCS 7 V8.1 SP1, Siemens identified an internal software defect in the CFC runtime group generator:

  • Known Defect: In early builds of CFC V8.1 SP1, when Chart-based insertion was enabled, duplicating a block with startup characteristics via Ctrl + Drag or Copy / Paste occasionally failed to generate the cyclic task runtime call, creating only the OB100 instance.
  • Official Siemens Fix: Siemens resolved this defect in CFC V8.1 SP1 Update 6, noting in the official update release notes: 'It sometimes occurred that a block with startup characteristics was only installed in OB100 and not in cyclic tasks. This problem has been resolved.'

The Role of Chart-Based Insertion and Selective Download

Understanding Chart-based Insertion clarifies why runtime groups behave dynamically:

  • Chart-Based Insertion (Planorientierter Einbau): Introduced in PCS 7 V8.1 under Chart folder Properties -> Advanced. Automatically creates chart-specific runtime groups in all relevant OBs (OB3x, OB100, OB8x).
  • Selective Download Support: This feature enables Selective Download, allowing engineers to download only modified charts without downloading the entire automation program.
  • When this option is active, improper predecessor assignment can lead to isolated OB100 runtime groups.

Step-by-Step Procedure to Diagnose and Reassign Omitted Blocks

To locate and restore blocks omitted from cyclic execution:

  1. Audit Block Runtime Header: In CFC, look at the top-right header of the Trigger block. If it displays only OB100 (e.g. 100/1) without a cyclic prefix (e.g. 35/1), the block is missing from cyclic execution.
  2. Open the Runtime Editor: In CFC, click the Runtime Editor icon or press Ctrl + R.
  3. Inspect OB100 and Cyclic Tasks:
    * Expand OB100 and locate the chart's runtime group. Confirm the presence of the block.
    * Expand OB35 (or target cyclic OB). Notice that the block instance is missing from the cyclic runtime group.
  4. Manually Insert into Cyclic OB:
    * In the Runtime Editor, locate the chart group in OB35.
    * Right-click the group and select Insert Block... (or drag the block from the chart directly into the OB35 group).
  5. Reset Insertion Predecessor: In CFC, right-click a valid cyclic block in the chart, select Predecessor for insert position, and ensure OB35\<ChartName> is selected.
  6. Install CFC Update 6: Verify that CFC V8.1 SP1 Update 6 (or latest update bundle) is installed across all engineering stations.

Block Task Assignment and Runtime Group Characteristics Matrix

The following table compares block task scheduling across standard PCS 7 execution environments:

Block TypePrimary Task (Cyclic)Startup Task (OB100)Diagnostic / Fault TaskFailure Symptom if Missing in CyclicTrigger (FB1821)OB30 to OB38 (Cyclic)OB100 (s7_tasklist)NoneBlock executes only once at CPU boot; never triggers in RUNTimerP (FB1810)OB30 to OB38 (Cyclic)OB100 (s7_tasklist)NoneTimers never decrement; elapsed time remains stuck at zeroMotL / VlvL (APL)OB30 to OB38 (Cyclic)OB100 (s7_tasklist)OB8x (via driver)Commands do not process; faceplates report frozen statusMonAnL (APL)OB30 to OB38 (Cyclic)OB100 (s7_tasklist)NoneLimit alarms do not evaluate; trend values do not updateEvent / EventTsOB30 to OB38 (Cyclic)OB100 (s7_tasklist)NoneMessages generated only during CPU restart; runtime events lost

Verification

Confirm that the block executes cyclically in runtime:

  1. CFC Block Header Verification: Inspect the block in CFC. Verify that the runtime indicator displays both the cyclic OB and OB100 (e.g. 35/4 and 100/2).
  2. Online Test Mode: Switch CFC to Test Mode. Toggle an input signal on the Trigger block. Confirm that the output pulses or responds cyclically in RUN mode.
  3. Consistency Check: In SIMATIC Manager, select the Chart container and run Options -> Check Consistency. Confirm 0 errors.

Preventive Engineering Practices in Multi-Task CFC Architectures

To prevent task misassignments during mass engineering:

  • Always Audit Runtime Position After Duplicating: When using Ctrl + Drag to clone blocks, verify that the upper-right runtime pointer displays the expected cyclic task.
  • Use Chart-Based Predecessors: When setting insertion points, always select the cyclic OB entry (OB35\...), never the startup OB.
  • Maintain Software Update Discipline: Regularly apply official Siemens PCS 7 Update Bundles to eliminate compiler and editor bugs.

Limitations and Operational Precautions

Manually dragging blocks in the Runtime Editor modifies execution order. Ensure that measurement blocks execute before controller blocks, and controller blocks execute before driver output blocks to prevent 1-cycle calculation delays.

Always verify runtime changes in an offline simulation environment (S7-PLCSIM) before executing delta downloads to live controllers.

Engineer FAQ

Why does CFC consistency check not warn that a block is only in OB100?

CFC consistency check verifies syntax and open pins, but installing a block only in OB100 is syntactically legal (e.g. for one-time initialization blocks), so no compiler error is generated.

Can a block execute in OB100 without an entry in OB3x?

Yes, but its logic will only execute a single time during CPU restart, making it useless for continuous process control.

How do I verify which update of CFC is installed?

In the Windows Start Menu, open Siemens Installed Software, expand SIMATIC CFC, and check the installed update level.

Does installing CFC Update 6 require recompiling all charts?

Installing the update fixes future insertions, but blocks already incorrectly placed must be manually reassigned in the Runtime Editor before compiling.

Technical References

Related Articles

Related Tags

8 respuestas