Resolving Driver Generator Error 'Attribute DATA Has an Invalid Value According to the DTD/Schema' in PCS 7 V8.2
In SIMATIC PCS 7 V8.2, the driver compilation error 'Attribute DATA has an invalid value according to the DTD/Schema' during CFC compilation (Generate Module Drivers) occurs when a project migrated from an earlier version (such as PCS 7 V8.1) retains outdated Advanced Process Library (APL) or S7 F-Systems library block versions in the project's offline block folder. The PCS 7 V8.2 driver generator enforces a modernized XML schema definition for module diagnostic structures. When the compiler evaluates V8.1 block instances against the V8.2 schema, validation fails. To resolve this, engineers must open the PCS 7 V8.2 APL master library, update the project library, execute an 'Update Block Types' operation in CFC to update all FBs to V8.2, and recompile CFC charts with module driver generation enabled.
Table of Contents
- Mechanism of XML DTD/Schema Validation in the PCS 7 Driver Generator
- Root Cause Analysis: Library Version Discrepancies During V8.1 to V8.2 Migration
- Step-by-Step Procedure to Update Block Types in CFC
- Handling S7 F-Systems and Custom Master Libraries
- Comparison of Migration Strategies (With vs Without Utilization of New Functions)
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Mechanism of XML DTD/Schema Validation in the PCS 7 Driver Generator
The SIMATIC PCS 7 driver generator (s7driver.exe) is an automated system tool executed during CFC compilation. It parses the hardware topology configured in HW Config, analyzes the symbolic interconnections on channel blocks (Pcs7AnIn, Pcs7DiIn), and automatically generates the @ system charts containing diagnostic blocks (MOD_D1, RACK, SUBNET, OB_BEGIN).
To ensure strict data integrity, the driver generator utilizes internal XML Document Type Definition (DTD) and XSD schema files located in <Step7_Path>\S7DATA\Drivers. Every block parameter attribute, diagnostic structure, and interconnection rule must conform strictly to this schema before the compiler will output machine code.
Root Cause Analysis: Library Version Discrepancies During V8.1 to V8.2 Migration
When a project created in PCS 7 V8.1 is retrieved on an Engineering Station running PCS 7 V8.2, engineers often delete the existing @ charts and attempt to compile immediately. This triggers the schema error:
- Outdated Driver Template Blocks: The project's offline block container still holds PCS 7 V8.1 versions of the driver blocks (
MOD_...,CH_...). - Schema Incompatibility: The PCS 7 V8.2 driver generator engine applies V8.2 DTD rules. The internal
DATAattribute format of V8.1 blocks violates the tighter type-checking and diagnostic enumeration rules introduced in V8.2. - S7 F-Systems Block Retention: If the project uses S7 F-Systems (e.g., F-Lib V1.3), retaining obsolete fail-safe channel drivers without reconciling the safety library causes secondary compilation abortions.
Step-by-Step Procedure to Update Block Types in CFC
To resolve the schema error, the project's block types must be formally upgraded to the installed PCS 7 V8.2 library baseline:
- Open APL Master Library: In SIMATIC Manager, select File > Open > Libraries and open the official PCS 7 AP Library V82.
- Copy Updated Blocks: Copy all blocks (
Blocksfolder) from the V8.2 library into your project's Master Library. - Update Block Types in CFC:
- Open any CFC chart in the project.
- Navigate to menu Options > Block Types....
- In the left pane ('Block types in chart folder'), highlight all blocks (or specificallyPcs7AnIn,Pcs7DiIn,MOD_...).
- Click New Version... (or select the master library as source and click Update).
- Review the listed interface changes; click OK to accept. - Regenerate Drivers: In CFC, select Chart > Compile > As Program. Check Generate module drivers and select scope Entire program.
- The compiler regenerates all
@charts conforming cleanly to the V8.2 DTD schema.
Handling S7 F-Systems and Custom Master Libraries
If the project contains safety logic:
- Verify that the correct S7 F-Systems version (e.g., S7 F-Systems V6.2 or V6.4) is installed on the ES.
- Update the F-Library blocks (
F_CH_DI,F_CH_AI,F_CTRL) in the Master Library. - Perform block type updates on the F-blocks in CFC. Note that updating F-blocks will change the Safety Program CRC, requiring a safety acceptance compilation and test.
Comparison of Migration Strategies (With vs Without Utilization of New Functions)
The following table compares the two official Siemens software update pathways for PCS 7:
| Upgrade Criterion | Software Update WITHOUT Utilization of New Functions | Software Update WITH Utilization of New Functions |
|---|---|---|---|
| Block Type Update | Blocks remain at old version where possible | All blocks updated to latest PCS 7 version |
| Controller Download Scope | Delta download frequently permitted | Mandatory Entire Download to CPU in STOP |
| Driver Generation | Uses compatibility drivers | Uses latest optimized V8.2 driver blocks |
| DTD Schema Risk | High (Prone to schema syntax errors) | Zero (All blocks match installed compiler) |
| Recommended Use Case | Emergency mid-campaign software update | Planned capital turnaround / DCS modernization |
Verification
Verify successful driver generation without schema errors:
1. In SIMATIC Manager, execute 'Chart > Compile > As Program' with 'Generate module drivers' enabled.
2. Inspect the compilation log; confirm that the compilation completes with '0 Errors' and that no DTD/Schema warnings appear.
3. Open the newly generated @ system charts in the CFC editor; confirm that diagnostic blocks (MOD_D1, RACK) are instantiated and interconnected to the hardware address symbols.
4. Verify that downstream WinCC OS compilation succeeds without orphaned driver tags.
Limitations and Operational Precautions
Updating block types across an entire automation program can modify block interfaces, which prevents online delta downloading to the S7-400 / CPU 410 controller. In an operating production plant, never execute a global block type update without planning a scheduled controller shutdown or utilizing PCS 7 Type Update in RUN (TCiR) where supported by CPU 410-5H firmware.
Engineer FAQ
Why does deleting @charts not fix the DTD/Schema error?
Deleting @ charts only removes the previously generated system charts. When the compiler runs again, it uses the outdated driver blocks still residing in the offline block container, immediately re-triggering the schema error.
What is the difference between 'Compile Changes Only' and 'Entire Program' after updating block types?
Updating block types alters the structure of the program database. A full compilation ('Entire Program') is mandatory to ensure all instances, system data blocks (SDBs), and driver links are rebuilt consistently.
Where is the official Siemens guide for upgrading projects between versions?
Siemens publishes two dedicated manuals: 'PCS 7 Software Update with Utilization of New Functions' and 'PCS 7 Software Update without Utilization of New Functions'.
Technical References
- SIMATIC Process Control System PCS 7 Software Update with Utilization of New Functions
- SIMATIC Process Control System PCS 7 Driver Concept and Block Descriptions
- SIMATIC S7-CFC for S7 / S7-SCL Configuration Manual
Related Articles
- Synchronizing Control Module Types (CMT) with Project CFC Charts in SIMATIC PCS 7
- Resolving Delta Download Blocks and Phantom Data Block References in SIMATIC PCS 7 CFC
- Engineering Roadmap and Technical Manual Hierarchy for SIMATIC PCS 7 Project Creation
Related Tags
- Driver Generator
- DTD Schema
- Block Type Update
- PCS 7 V8.2
- Software Update