Troubleshooting SIMIT Generic XML Import Schema Errors and Automated Diagram Generation

Troubleshooting SIMIT Generic XML Import Schema Errors and Automated Diagram Generation

In SIMIT Simulation Platform (V8.1 and V9.x), 'File defective / Format error' exceptions during Generic XML Import occur due to strict schema mismatch, specifically using the attribute ID instead of UID for component elements, or using outdated XML namespace declarations. SIMIT's XML parser requires COMP elements to be declared with UID='...' rather than ID='...'. Correcting this attribute syntax and validating XML against the SIMIT Generic XML schema restores automated generation of simulation diagrams and coupling signals.

Table of Contents

Architecture of SIMIT Generic XML Import for Virtual Commissioning

In modern industrial automation engineering, virtual commissioning of process plants using SIMIT Simulation Platform (e.g., SIMIT V8.1 Ultimate or SIMIT V9/V10) enables complete testing of PLC programs, safety interlocks, and OS graphics before hardware installation. To eliminate manual drawing of thousands of simulation components (valves, pumps, transmitters, actuator feedback loops), SIMIT provides the Generic XML Import interface.

Through Generic XML, engineering tools (such as Python scripts, Excel macros, or COMOS / Plant Automation Accelerator) can automatically generate:
1. Complete simulation diagrams (.simdiags).
2. Simulation components instantiated from standard or user libraries.
3. Coupling signals linking simulation models to controller I/O (PROFINET, PROFIBUS, S7-PLCSIM, Virtual Controller, or Shared Memory - SHM).
4. Direct signal-to-signal connections and topological wiring.

However, the SIMIT XML parser is an unforgiving validating parser. Minor deviations from the internal XML Schema Definition (XSD)—such as documentation typos in Siemens sample files—trigger the fatal error:
File defective: In the file ...\Sample3.xml there is a format error.

SIMIT Generic XML Element and Attribute Specification Matrix

The following specification defines the mandatory XML tag structure and attribute naming for SIMIT Generic XML imports:

XML Element TagMandatory AttributesAllowed Child ElementsDescription and Syntax Requirement<GENERIC>VERSION="8.1"<DIAGRAM>, <COUPLING>Root container element; version must match SIMIT release<DIAGRAM>NAME="String"<COMP>, <CONNECT>Declares a new simulation chart page in SIMIT project<COMP>UID="String", NAME="String", TYPE="String"<POS>, <PARAM>, <PORT>Crucial: Must use UID (Unique ID), NOT ID. Identifies component instance<POS>X="Integer", Y="Integer"NoneCoordinates of the component symbol on the diagram canvas<PORT>NAME="String", CONNECT="String"NoneDeclares component input/output pins and signal binding<PARAM>NAME="String", VALUE="String"NoneParameterizes component properties (e.g., stroke time, gain)<SIGNAL>NAME="String", TYPE="Binary/Analog"NoneDeclares global or coupling signals

Documentation warning: Legacy SIMIT manuals and Sample3.xml erroneously printed ID="..." in code listings; the parser strictly requires UID="...".

Diagnosing 'File Defective' Format Errors (COMP ID vs. COMP UID)

When SIMIT rejects an XML file with a format error:

  1. Check Component Identifier Syntax (UID vs ID):
    * Inspect the offending line in the XML file.
    * Incorrect syntax:
    xml <COMP ID="f_000hsn_1zisln8r" NAME="SHM/S_Ax_Rohr_pos">
    * Corrected syntax:
    xml <COMP UID="f_000hsn_1zisln8r" TYPE="Standard/Valve" NAME="SHM/S_Ax_Rohr_pos">
    * SIMIT's schema validator uses the UID attribute to track internal entity persistence; encountering ID causes schema validation failure.
  2. Verify XML Header and Version Tag:
    * Ensure the file begins with a standard UTF-8 XML declaration:
    xml <?xml version="1.0" encoding="utf-8"?>
    * Verify that the <GENERIC> tag specifies the matching software version: VERSION="8.1" for SIMIT V8.1 or VERSION="9.0" for SIMIT V9.0.
  3. Verify Coupling Signal References:
    * If connecting to an external coupling (e.g., SHM - Shared Memory or PROFINET), ensure the coupling already exists in the SIMIT project with exact matching signal names prior to running the diagram import.

Step-by-Step Procedure for Automated Diagram and Signal Generation

Follow this workflow to generate SIMIT diagrams automatically:

  1. Construct Compliant XML Template:
    * Create the target XML file structured as follows:
    xml <?xml version="1.0" encoding="utf-8"?> <GENERIC VERSION="8.1"> <DIAGRAM NAME="Drive_Simulation_01"> <COMP UID="comp_valve_001" TYPE="Standard/Valve" NAME="V101_Actuator"> <POS X="300" Y="200"/> <PARAM NAME="OpenTime" VALUE="5.0"/> <PORT NAME="Control" CONNECT="Coupling_PLCSIM/V101_Cmd"/> <PORT NAME="OpenFeedback" CONNECT="Coupling_PLCSIM/V101_Opened"/> </COMP> </DIAGRAM> </GENERIC>
  2. Execute XML Import in SIMIT:
    * Open the target SIMIT project.
    * In the main menu, select Automatic Model Construction > Generic XML Import (or right-click the project tree and select Import > Generic XML).
    * Browse to the generated XML file and click Start Import.
  3. Review Import Log:
    * Inspect the SIMIT message log: Confirm that components are instantiated and signals are connected with zero warnings.

Verification

Verify automated generation success:
1. Open the project navigation tree in SIMIT.
2. Confirm that the new diagram Drive_Simulation_01 appears under the Diagrams folder.
3. Open the diagram canvas: Verify that the valve component appears at coordinate (300, 200).
4. Double-click the component: Confirm that parameter OpenTime is set to 5.0 and the ports show green connection indicators wired to the PLCSIM coupling signals.
5. Start simulation runtime: Verify that toggling the control signal initiates valve animation.

Limitations and Operational Precautions

  • XML element names and attributes in SIMIT Generic XML are case-sensitive; entering <comp> or <pos> in lowercase will cause parser rejection.
  • If duplicate UID values are present within the same XML import file, SIMIT aborts the import to prevent database corruption. Ensure script-generated UIDs are globally unique.
  • Always back up the SIMIT project (.simproj) before executing bulk XML imports, as imported diagrams cannot be reverted via simple 'Undo'.

Engineer FAQ

Why was Sample3.xml provided by Siemens defective?

In early releases of SIMIT V8.1, the sample file Sample3.xml and its associated manual documentation contained an uncorrected typo where 'UID' was printed as 'ID'. This was resolved in subsequent updates and hotfixes.

Can I import signals into existing couplings using Generic XML?

Yes. The Generic XML interface supports <COUPLING> blocks to create and populate signal lists for Shared Memory (SHM), OPC DA, and Virtual Controller interfaces.

What tool is best for generating SIMIT XML files in bulk?

Python scripts reading I/O schedules (CSV/Excel) or automation tools like Siemens Plant Automation Accelerator (PAA) are commonly used to generate thousands of SIMIT XML components automatically.

Technical References

Related Articles

Related Tags

  • SIMIT
  • Generic XML
  • XML Import
  • Virtual Commissioning
  • UID
  • Simulation Diagram
  • PCS 7 Simulation
6 respuestas