How to Resolve SPLIT_DIAG XML Driver Generator Errors During CFC Compilation in PCS 7 V8.1
In SIMATIC PCS 7 V8.1, the CFC compiler error 'File AL_CPU.xml contains formal errors... Error in line 431: ' occurs during module driver generation when XML driver action templates in the STEP 7 system directory become corrupted or version-skewed during multi-version project migration. This schema mismatch prevents the driver generator from building system diagnostic charts (@charts). To resolve the error, do not edit XML files manually; instead, reinstall the PCS 7 Basis Library and Advanced Process Library (APL) in strict sequential order from the official installation media or apply the latest Basis Library Update Rollup to restore clean driver XML schema files.
Table of Contents
- Role of the XML Driver Action Templates in the PCS 7 Driver Generator
- Root Causes of the SPLIT_DIAG Schema Validation Failure
- Why Deleting @Charts Does Not Resolve the XML Parsing Error
- Step-by-Step Procedure to Reinstall Basis Libraries and Repair Schemas
- Comparison of Driver Library Behaviors Across PCS 7 Versions
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Role of the XML Driver Action Templates in the PCS 7 Driver Generator
In SIMATIC PCS 7, the Driver Generator (Generate module drivers) is an automated compiler mechanism that inspects the hardware configuration (HW Config) and instantiates diagnostic driver blocks (OB_DIAG1, MOD_D1, RACK, CPU_DIAG) within internal CFC charts prefixed with @ (e.g., @Chart_AS1).
To map physical hardware topology into software diagnostic blocks, the driver generator interprets XML rule templates located on the Engineering Station in:
C:\Program Files (x86)\SIEMENS\STEP7\S7DATA\driver\action\08010000\
These XML files (such as AL_CPU.xml, AL_ET200M.xml, Actions.xns) contain Document Type Definitions (DTD) and schemas that instruct the compiler how to connect interrupt signals, split diagnostic telegrams, and instantiate driver blocks based on the detected CPU and I/O modules.
Root Causes of the SPLIT_DIAG Schema Validation Failure
The specific compiler fault:
E: File ...\08010000\AL_CPU.xml contains formal errors. Error message: >> Element content is invalid according to the DTD/Schema. Expecting: {x-schema:..\Actions.xns}DIAG_DESC... E: Error in line 431: >> <SPLIT_DIAG AS="0" FIELD="1"/> >>> Due to the previous error(s), creation of module drivers was aborted<<<
stems from version skew and corrupted system files:
1. Multi-Version Project Migration Residue: When migrating projects across several generations (e.g., V6.1 -> V7.1 -> V8.1), older channel driver blocks (from CHN71) or legacy add-on libraries (such as older SIMOCODE or third-party EDD drivers) leave inconsistent block definitions in the block folder.
2. Corrupted Driver Action Directory: Installing unverified hotfixes or installing libraries out of order can overwrite the master XML definitions in 08010000 with older or mismatched schema versions. When the compiler evaluates AL_CPU.xml, it encounters the <SPLIT_DIAG> element at a position unexpected by the schema validator.
3. Driver Library Selection Mismatch: In the CFC compile dialog under Version of the driver library, selecting PCS 7 Basis Library V71 may mask the error temporarily because V7.1 uses an older XML parser, but it fails to generate proper V8.1 diagnostic structures for modern CPUs like the CPU 410-5H.
Why Deleting @Charts Does Not Resolve the XML Parsing Error
Engineers encountering compilation failures often attempt to delete all @charts manually in CFC:
* Deleting @charts removes previously compiled module driver instances and breaks invalid interconnects, forcing the compiler to perform a clean regeneration.
* However, if the root failure is an XML schema parsing error in AL_CPU.xml, deleting @charts will not fix the issue.
* The error occurs within the compiler's XML parsing engine before any blocks are placed into @charts.
* Once the compiler aborts on SPLIT_DIAG, no @charts can be generated, leaving the automation station completely devoid of diagnostic drivers.
Step-by-Step Procedure to Reinstall Basis Libraries and Repair Schemas
To permanently repair the corrupted driver XML action directory on the Engineering Station:
- Close All SIMATIC Applications:
* Exit SIMATIC Manager, CFC, HW Config, and WinCC Explorer cleanly.
* Open Windows Task Manager and verify nos7*.exebackground processes remain active. - Download or Retrieve Official Library Media:
* Obtain the official Siemens installation media for PCS 7 Basis Library V8.1 (or download the latest consolidated update from Siemens Industry Online Support Entry ID109480136). - Execute Clean Reinstallation in Sequence:
* Run the setup for PCS 7 Basis Library V8.1. ChooseRepairorReinstall.
* Next, run the setup for PCS 7 Advanced Process Library (APL) V8.1. ChooseRepair.
* The installer completely replaces theS7DATA\driver\actiondirectory with fresh, mathematically validated XML schema files and DTD references. - Reconcile Master Data Library in SIMATIC Manager:
* Open the multi-project in SIMATIC Manager.
* Open the project's Master Data Library (MDL).
* Copy the updated driver blocks from the freshly installedPCS 7 Basis Library V81into the MDL block folder.
* In the MDL, selectOptions > Charts > Update Block Types...and update all AS programs. - Execute Full CFC Compilation:
* Open any CFC chart. SelectChart > Compile > Entire Program.
* CheckGenerate module drivers.
* Under driver library version, ensurePCS 7 Basis Library V81is selected.
* ClickOK. The compiler parsesAL_CPU.xmlsuccessfully and builds all@chartswithout errors.
Comparison of Driver Library Behaviors Across PCS 7 Versions
The table below outlines how driver generator schemas behave across PCS 7 versions and the symptoms of version mismatch.
S7DATA\driver\action\07010000S7DATA\driver\action\08000000S7DATA\driver\action\08010000SPLIT_DIAG error if XML skewedS7DATA\driver\action\09000000Verification
To confirm that the SPLIT_DIAG driver error is fully resolved:
1. In CFC, initiate a full compile: Chart > Compile > Entire Program with Generate module drivers enabled.
2. Verify that the compilation log outputs: Compilation complete: 0 Error(s), 0 Warning(s).
3. In SIMATIC Manager Component View, verify that system @charts (e.g., @Chart_AS1) are successfully generated in the CFC chart folder.
4. Open @Chart_AS1 and confirm that CPU_DIAG and OB_DIAG1 are interconnected to valid hardware address tags.
5. Perform a test download to the CPU (or PLCSIM) and verify the controller runs in RUN mode without peripheral access alarms.
Limitations and Operational Precautions
- Never attempt to open and edit
AL_CPU.xmlorActions.xnsusing a text editor; manual edits break XML cryptographic checksums and violate system software integrity. - Do not attempt to fix driver errors by copying individual XML files from a different PCS 7 version or an unverified virtual machine.
- When migrating projects across versions, always follow the published Siemens migration guides; skipping intermediate versions leaves orphaned driver templates.
- Ensure all third-party add-on hardware (such as drives or protection relays) have their specific PCS 7 add-on driver packages updated to match PCS 7 V8.1.
Engineer FAQ
Why did the driver compilation work in another virtual machine?
Because the driver generator relies on local XML templates installed in the Windows file system (STEP7\S7DATA\driver), not files stored inside the project .s7p database. If one VM has a corrupted or improperly patched Basis Library installation, it fails even if the project database is identical.
Can I compile without 'Generate module drivers' temporarily?
Yes, unchecking 'Generate module drivers' allows compiling user application charts. However, without module drivers, the AS will have no diagnostic alarm generation, no rack monitoring, and no hardware status propagation to WinCC.
What does the SPLIT_DIAG XML element do?
In PCS 7 Basis Library XML templates, <SPLIT_DIAG> is an internal compiler directive that instructs the driver generator how to separate and distribute diagnostic interrupt telegrams across multiple AS system charts and field bus segments.
Technical References
- SIMATIC Process Control System PCS 7 Basis Library Function Manual
- Siemens Industry Online Support FAQ: Resolving Module Driver Compilation Errors in PCS 7
Related Articles
- Troubleshooting CFC Module Driver Generation Failures in PCS 7
- Best Practices for Multi-Version PCS 7 Project Migrations
- Reconciling Master Data Libraries and Updating Block Types
Related Tags
- Basis Library
- CFC
- Module Drivers
- SPLIT_DIAG
- PCS 7 V8.1