what is PLCopen XML?

What is PLCopen XML?

PLCopen XML is an XML-based exchange format for sharing program information from PLC projects between software tools. It provides a common structure for exporting supported project items and importing them elsewhere. The XML file is different from the executable program downloaded to a controller.

Is it a programming language? No. Structured Text and Ladder Diagram define how control logic is written. PLCopen XML defines how information about that logic is represented in a file. The programming language and exchange format have different jobs. A file written in XML is not necessarily a PLCopen XML file.

Its connection to IEC standards: PLCopen's XML exchange work provided the basis for IEC 61131-10. This standard covers XML exchange of IEC 61131-3 projects, including graphical program information such as FBD connections and SFC structures. Distinguish the standard's scope from the items a particular tool can actually transfer.

What can the file contain? It can represent POUs (program organisation units), such as programs, functions and function blocks, along with variable declarations, data types and supported configuration information. Graphical structures can include connections and layout information. The actual contents depend on the schema and the items selected for export.

What does an XML schema do? An XSD file defines the accepted structure of elements, attributes and relationships in an XML document. Validation against the correct schema helps identify format errors. Passing schema validation does not prove the control logic is correct. File structure, software compatibility and application behaviour need different checks.

How do export and import work? In the PLC programming environment, select supported items and export them using the required XML format. Use the matching import command in the target programming software, then review the available items and warnings. Changing a file extension does not convert its format.

Objects with the same name: An imported block or variable may have the same name as an existing object. The tool may offer to replace the existing object, rename the new one or skip it. This choice affects which code the project uses. Back up the existing project and review the objects that will be replaced.

A CODESYS example: CODESYS uses .export for its native XML exchange format and .xml for PLCopen XML exchange. These formats do not cover the same objects, and the PLCopen XML route does not guarantee full compatibility. For transfers between the same development environments, also consider the coverage of the manufacturer's recommended native format.

Older PLCopen XML and IEC 61131-10: Older PLCopen XML schemas and the IEC 61131-10 schema are not directly interchangeable. The schema version and namespace matter, as well as the format's name. Check that both tools support the same format; renaming an old file does not convert it to a newer format.

Manufacturer-specific items: Editor features and additional objects may have different support in different tools. For example, CODESYS's IEC 61131-10 exchange does not include CFC objects or the library manager. This example is not a support list for every tool. Check the chosen exchange command's scope and how the receiving tool handles vendor extensions.

Library dependencies: Imported code may call a PID control block or an edge detection block. Finding a block with the same name in the target does not prove that its inputs, outputs and behaviour match. Check the required libraries and their versions separately. Compare startup, reset and internal state behaviour in particular.

Hardware mapping: Moving a program does not make the PLC CPU or input/output modules identical. Channel addresses, signal types and remote I/O configuration may change in the target system. Verify the mapping between software variables and physical channels. An imported output name does not prove that the correct equipment is connected.

Tasks and runtime behaviour: After transfer, review task timing, program calls, priorities and initial values. Do not assume the target achieves the source project's cycle time. The same code can produce different results with a different call schedule. Also check how retained values and stateful blocks behave after a restart.

A short transfer example: Suppose a block compares temperature from a sensor with an upper limit and produces an alarm. Even after importing the block, check the temperature unit, measurement validity, limit value and alarm destination. Sharing block logic is different from transferring the measurement channel and the entire machine project.

Communication and screen projects: PLCopen XML is different from a protocol such as Modbus, which carries live data in industrial communication. Transferring PLC code does not automatically transfer HMI screens or a SCADA project. Review connection settings, addresses and separate project files in their own tools.

After importing: Review missing items and warnings, then compile for the target and perform debugging. Compare normal operation, boundary values, invalid inputs and restart scenarios. A successful import message does not mean the application has been validated. Record import results separately from functional test results.

Documentation and backups: The machine-readable structure can help suitable tools inspect programs, generate documentation and track changes. However, an XML file containing selected objects does not replace a complete project backup. Keep the native project file and dependency information too. Record the source software, its version and the exchange format alongside the file.