Resolving CFC Runtime Group 0 Defects and S7JCFCAX.EXE Crashes During Block Copying in PCS 7

Resolving CFC Runtime Group 0 Defects and S7JCFCAX.EXE Crashes During Block Copying in PCS 7

In SIMATIC PCS 7, copying a function block within or between CFC charts resulting in the block being assigned to Runtime Group 0 ('0/-')—causing the block to remain unexecuted by the CPU and crashing the CFC editor (S7JCFCAX.EXE) upon cut/paste—is a known defect in specific updates of the CFC engineering software (notably CFC V9.0 SP2 Upd 1/Upd 2). In STEP 7 architecture, runtime group 0 does not exist in the cyclic task scheduler, rendering the block dead. When an engineer attempts to cut or delete the corrupted block, an unhandled null pointer exception crashes S7JCFCAX.EXE. To resolve this issue, install the latest CFC update (CFC V9.0 SP2 Upd 3 or upgrade to PCS 7 V9.0 SP3). To recover an affected chart without crashing, open the Run Sequence editor (CFC > Edit > Run Sequence) and drag the orphaned block from group 0 into a valid cyclic interrupt OB (e.g., OB35).

Table of Contents

Executive Summary

Modular engineering in SIMATIC PCS 7 relies heavily on copying standard logic patterns, interlocks, and control modules across CFC charts. A severe engineering defect occurs when duplicated blocks are assigned by the CFC editor to an invalid runtime group designated as 0/-. Despite successful compilation and download to physical controllers or S7-PLCSIM without compiler errors, the copied block never executes in the controller (e.g., boolean outputs never evaluate). When an engineer attempts to cut or move the block to rectify the issue, the CFC editor abruptly crashes with a Microsoft Visual C++ Runtime error in S7JCFCAX.EXE. This failure stems from internal pointer corruption in the CFC chart database, which is resolved by installing Siemens hotfixes and manually rescuing the block via the Run Sequence editor.

Architecture and Fundamental Mechanics

The execution scheduling architecture of PCS 7 Continuous Function Charts (CFC) governs how functional blocks are translated into cyclic execution code:

  1. The Runtime Model and Organization Blocks (OBs):
    * S7-400 and CPU 410-5H controllers execute control logic within Organization Blocks (OBs). Typical PCS 7 logic executes in cyclic interrupt OBs (e.g., OB35 - 100 ms, OB34 - 200 ms, OB32 - 1000 ms).
    * Within each OB, blocks are organized into Runtime Groups. A runtime group specifies the exact execution order, task name, and reduction ratio for contained blocks.
    * Each block instantiated in a CFC chart displays its runtime position in the block header in the format (<OB_Number>/<Group_Number>), e.g., (35/2).
  2. The Runtime Group 0 Defect:
    * Due to a bug in the block duplication subroutine of S7JCFCAX.EXE (the ActiveX control hosting the CFC workspace), copying certain blocks fails to inherit the parent chart's default runtime group.
    * Instead of assigning the block to the chart's designated OB (e.g., OB35), the editor assigns the block to index 0 (0/-).
    * In STEP 7 SDB generation, OB 0 is an invalid task identifier. The compiler ignores the block during machine code generation because it does not belong to any valid task dispatch queue. Thus, the block never executes in runtime.
  3. The S7JCFCAX.EXE Crash Mechanics:
    * When an engineer selects the corrupted block and presses Ctrl + X (Cut) or attempts to delete it, CFC calls the database detachment method.
    * The detachment routine attempts to dereference the pointer to the parent runtime group. Because the group index is 0, the pointer resolves to NULL.
    * The application generates an unhandled access violation (C++ exception), causing Windows to terminate S7JCFCAX.EXE with the error: 'This application has requested the Runtime to terminate it in an unusual way'.

Step-by-Step Implementation Procedure

Follow these procedures to resolve the Runtime Group 0 defect and prevent CFC crashes:

  1. Manually Reassign the Orphaned Block via Run Sequence Editor:
    * Do NOT attempt to cut, paste, or delete the block directly from the CFC chart workspace, as this will trigger the S7JCFCAX.EXE crash.
    * In the CFC editor menu, select Edit > Run Sequence... (or press Ctrl + F5).
    * The Run Sequence window opens, displaying the execution hierarchy of all OBs.
    * Look at the top or bottom of the task tree for an unassigned node or locate the block under the specific chart name.
    * Drag the affected block from its unassigned position into a valid, active runtime group inside the appropriate cyclic interrupt OB (e.g., OB35 > [Chart_Name]).
    * Close the Run Sequence editor.
    * Confirm that the block header in the CFC chart now displays a valid runtime assignment (e.g., (35/1)) instead of (0/-).
  2. Clean Up Database Inconsistencies:
    * In CFC, select Options > Block Types....
    * Select Clean Up to verify and purge obsolete block registrations.
    * Select Chart > Check Consistency to ensure all interconnections and execution groups are structurally sound.
  3. Install the Latest Siemens CFC Updates / Service Packs:
    * Check the installed CFC version in SIMATIC Manager under Help > About... > Display > Products.
    * If running CFC V9.0 SP2, download and install CFC V9.0 SP2 Update 3 (or the latest available update) from Siemens Industry Online Support (SIOS).
    * Alternatively, upgrade to PCS 7 V9.0 SP3 or PCS 7 V9.1, where this block duplication pointer defect is permanently patched.
  4. Compile and Download to Verify Execution:
    * In CFC, select Chart > Compile > Charts as Program with Changes only.
    * Download the changes to the controller or S7-PLCSIM.
    * Switch CFC to test mode (Test > Test Mode); verify that the block's outputs now calculate and update dynamically.

Verification

After reassigning the block via the Run Sequence editor and applying the software update, copy the block again within the chart. Verify that the new duplicate immediately receives a valid runtime group matching the parent chart (e.g., (35/x)). Select the block, press Ctrl + X, and paste it into another chart; confirm that the operation succeeds smoothly without crashing S7JCFCAX.EXE. In test mode, verify that logic operations (e.g., AND/OR truth tables) execute correctly in the AS.

Limitations and Operational Precautions

If a CFC chart is so severely corrupted that opening the Run Sequence editor also crashes CFC, do not attempt to edit the chart. Restore the chart from a recent uncorrupted multiproject backup, or delete the entire chart object from SIMATIC Manager's component view and recreate it.

Engineer FAQ

Why did the compiler report zero errors even though the block was not executing?

The CFC compiler only translates blocks assigned to valid OB task lists. Because the block was assigned to group 0, the compiler treated it as an orphaned, unassigned element and skipped code generation entirely.

What is S7JCFCAX.EXE?

It is the core 32-bit ActiveX executable component responsible for the graphical user interface, block layout, and canvas rendering of the STEP 7 / PCS 7 CFC editor.

Can I delete the block by deleting the entire CFC chart?

Yes. If cutting the block crashes CFC, you can safely delete the parent CFC chart from the SIMATIC Manager Component View or Plant View, which bypasses the workspace pointer dereference.

Does this defect affect S7-PLCSIM or physical CPUs?

It affects both equally, because the problem is in the offline CFC code generation and machine code export, not in the target controller hardware.

Technical References

Related Articles

Related Tags

  • CFC Crash
  • S7JCFCAX.EXE
  • Runtime Group 0
  • Run Sequence
  • Block Copying
  • OB35
20 respuestas