Attention

These docs are a bit ambitious. The steps described are accurate but IronPLC cannot yet run programs.

P0007

Code

P0007

Message

XML violates PLCopen schema

This error occurs when a PLCopen XML file is valid XML but does not conform to the PLCopen TC6 XML schema. The file can be parsed as XML, but its structure doesn’t match what the compiler expects.

Example

This error typically occurs due to:

  1. Wrong root element (must be <project>)

  2. Missing required elements (<fileHeader>, <contentHeader>, <types>)

  3. Invalid element names or structure

  4. Missing required attributes

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://www.plcopen.org/xml/tc6_0201">
  <!-- Wrong root element - should be <project> -->
</configuration>

The compiler expects the root element to be <project>, not <configuration>.

To fix this error, ensure your XML file follows the PLCopen TC6 v2.01 schema:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201">
  <fileHeader companyName="Company" productName="Product" productVersion="1.0" creationDateTime="2024-01-01T00:00:00"/>
  <contentHeader name="ProjectName">
    <coordinateInfo>
      <fbd><scaling x="1" y="1"/></fbd>
      <ld><scaling x="1" y="1"/></ld>
      <sfc><scaling x="1" y="1"/></sfc>
    </coordinateInfo>
  </contentHeader>
  <types>
    <dataTypes/>
    <pous/>
  </types>
</project>

The PLCopen XML format is defined by the PLCopen Technical Committee 6 (TC6). Refer to the PLCopen XML specification for complete schema documentation.