Resolving Inconsistent Control Files and Module Driver Generation Aborts in SIMATIC PCS 7

Resolving Inconsistent Control Files and Module Driver Generation Aborts in SIMATIC PCS 7

In SIMATIC PCS 7 (V8.1 / V9.0 / V9.1), compilation failures where the driver generator halts with 'E: Abort due to an internal error. The control files may be inconsistent' are caused by corrupt driver descriptor tables or orphaned block headers in the project database following project reorganization. To resolve this, first compile the CFC charts completely with 'Generate module drivers' unchecked to purge orphaned references, update Basis Library block types from the Master Data Library across all charts, execute a consistency check and save/compile in HW Config, and recompile CFC charts with 'Generate module drivers' enabled.

Table of Contents

Executive Summary

During plant engineering and software maintenance in SIMATIC PCS 7 (such as V8.1 or V9.0 on CPU 410-5H controllers), automation engineers rely on the automated module driver generator to link channel blocks with hardware diagnostic structures. Occasionally, following project reorganizations or hardware reconfigurations, compiling charts as a program abruptly aborts. The compilation log reports: E: Abort due to an internal error. The control files may be inconsistent. >>>Due to the previous error(s), creation of module drivers was aborted<<<.

Because the error message mentions 'inconsistent control files', engineers often suspect that internal Step 7 program files on the Windows hard drive are corrupted, attempting re-installations of the engineering software to no avail. In reality, this failure occurs within the project database: the driver generator (s7tgtopx.exe) encounters mismatched internal XML driver rules, orphaned driver block instances in @ charts, or out-of-sync block headers between the hardware configuration and the CFC chart folder. This guide details the step-by-step recovery methodology to resynchronize driver control files and successfully generate module drivers.

Architecture and Fundamental Mechanics

The PCS 7 driver generator relies on synchronized relational tables spanning three distinct engineering domains:

  1. The Control File Architecture:
    - When 'Generate module drivers' is executed, the driver generator parses XML and binary control files stored in C:\Program Files (x86)\Siemens\STEP7\S7DATA\driver\.
    - These files define which system driver blocks (from the PCS 7 Basis Library, such as MOD_CP, OR_M_16, RACK) must be placed in @ system charts based on the modules configured in HW Config.
    - The generator also reads internal project tables (*.ctl, cross-reference databases) that map module logical base addresses (LADDR) to CFC blocks.

  2. Database Desynchronization and Orphaned Pointers:
    - If a project is reorganized ('Save As... with Reorganization') while hardware changes are partially compiled, or if block types were updated in the Master Data Library without propagating to all charts, the internal relational pointers break.
    - When the compiler scans the hardware station, it attempts to bind an I/O module to an internal control file template that references an obsolete block signature.
    - Detecting this relational contradiction, the driver engine halts immediately to prevent generating corrupted machine code, throwing Abort due to an internal error. The control files may be inconsistent.

  3. The Decoupled Two-Step Compilation Recovery:
    - Compiling charts with 'Generate module drivers' UNCHECKED forces the CFC compiler to resolve pure algorithmic connections, recalculate chart execution groups, and purge orphaned system blocks.
    - Once the user program is cleanly structured, re-running the compilation with 'Generate module drivers' CHECKED allows the driver generator to rebuild all @ charts against a clean, consistent database foundation.

Step-by-Step Implementation Procedure

Follow these steps to eliminate control file inconsistency errors and regenerate module drivers:

  1. Compile Charts Without Module Drivers:
    - Open any CFC chart in SIMATIC Manager.
    - Select 'Chart > Compile > Charts as Program...'.
    - In the compile dialog, select 'Entire program'.
    - Crucially, UNCHECK the box 'Generate module drivers'.
    - Click 'OK'. Allow the compiler to finish. (The compilation should complete with 0 errors, cleaning out orphaned driver pointers).

  2. Verify and Recompile Hardware Configuration:
    - Open HW Config for the target automation station.
    - Select 'Station > Check Consistency'. Ensure no unassigned address gaps or conflicting diagnostic addresses exist.
    - Select 'Station > Save and Compile'. Ensure HW Config compiles with zero errors.

  3. Update Basis Library Block Types from Master Data Library:
    - Open the Master Data Library (MDL) for your multiproject.
    - In the MDL block folder, ensure the latest PCS 7 Basis Library blocks are present.
    - Select 'Options > Charts > Update Block Types...'.
    - In the selection dialog, select all target S7 programs and click 'OK'.
    - Allow Step 7 to sweep all CFC charts, updating block headers and interface stamps to match the library.

  4. Recompile Charts With Module Drivers Enabled:
    - Return to the CFC Editor.
    - Select 'Chart > Compile > Charts as Program...'.
    - Select 'Entire program'.
    - Check the box 'Generate module drivers'.
    - Click 'OK'. The driver generator will now reconstruct system @ charts (e.g., @(1), @(2)) without control file errors.

  5. Download to Controller:
    - Download the updated user program to the S7 CPU (in RUN mode if delta download is allowed, or schedule a CPU restart if structural DB boundaries changed).

Verification

  1. Inspect the CFC compilation log: confirm that 'Creation of module drivers completed successfully' is logged with 0 Errors, 0 Warnings.
  2. In the CFC chart tree, open chart @(1): verify that diagnostic blocks (e.g., MOD_CP, OR_M_16) are populated and interconnected with field hardware addresses.
  3. Open CFC in Test Mode (Online): confirm that channel driver blocks receive live process signals with Good quality status (16#80).
  4. Verify that CPU diagnostic LEDs (SF/BF) remain unlit during normal plant operation.

Limitations and Operational Precautions

Never manually edit or delete individual blocks inside auto-generated @ charts; manual modifications corrupt internal driver tables and trigger control file aborts. If database corruption persists after following these steps, export the CFC charts to a temporary library, create a pristine S7 program container, and re-import the charts. System licenses and software update collections should be verified through an authorized Siemens distributor or the Siemens Industry Mall.

Engineer FAQ

What causes 'The control files may be inconsistent' error during CFC compilation?

Relational desynchronization between internal driver descriptor tables, hardware configuration addresses, and block type interfaces in the project database.

Why does compiling without module drivers help resolve the error?

Compiling without module drivers purges stale relational pointers and resolves user logic connections, allowing the driver generator to rebuild @ charts on a clean foundation.

What block library provides the module driver blocks?

The SIMATIC PCS 7 Basis Library provides the core module drivers and diagnostic blocks.

Where are driver control files stored on the engineering station?

In C:\Program Files (x86)\Siemens\STEP7\S7DATA\driver\.

Does updating block types require stopping the controller?

Not necessarily; if the block interface changes are compatible with online delta download, updates can be deployed in RUN mode.

Technical References

Related Articles

Related Tags

  • Module Drivers
  • CFC Compile
  • Control Files Inconsistent
  • Basis Library
  • CPU 410-5H
  • PCS 7 V8.1
20 respuestas