> For the complete documentation index, see [llms.txt](https://infosys.selmotech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infosys.selmotech.com/selmo-solution/selmo-solution-en/selmo-structure-and-standard/selmo-technical-standard-and-structure/selmo-method-in-practice/plcopen-xml-export-and-import-with-selmo.md).

# 🔷 PLCOpen XML – Export and import with Selmo

###

**Inputs – What is done – Outputs**

***

#### 🔹 1. **Inputs – What is needed?**

| Category                                    | Description                                                                                                 |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Fully defined Selmo model**               | Logic and system layer fully modeled (incl. zones, bit control, sequences, parameters, safety functions)    |
| **Project structure / target architecture** | Target system defined (e.g. Siemens TIA Portal, Codesys, Beckhoff) with names, folder structure, PLC naming |
| **PLC interface specifications**            | Specifications for PLC configuration (e.g. instance names, global/local, signal structure)                  |
| **HMI binding (optional)**                  | Optional: Mapping of signals, buttons and states for the HMI                                                |
| **Import project (only for re-import)**     | XML file from PLC tool for re-import (e.g. commissioning data, extensions)                                  |

***

#### 🔹 2. **What is done? (Activities during export/import)**

| Step                                   | Description                                                                                                                                         |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Generate PLCOpen XML export**        | The complete model is output as a standards-compliant `.xml`file                                                                                    |
| **Generate structure**                 | Automatic structuring into instances, function blocks, variables, types                                                                             |
| **Check naming & mapping**             | Validation of names, data types, paths, compatibility with the target PLC                                                                           |
| **Import into PLC environment**        | XML is imported into the PLC tool (e.g. Codesys, TIA Portal), where the following are created automatically:                                        |
| → Programs, variables, logic structure |                                                                                                                                                     |
| **Re-import XML (optional)**           | If changes are made in the PLC, the project can be exported as XML and read back into Selmo Studio (e.g. diagnostic optimization, signal additions) |

***

#### 🔹 3. **Outputs – What is the result?**

| Result                                          | Description                                                            |
| ----------------------------------------------- | ---------------------------------------------------------------------- |
| ✅ **PLCOpen-compliant XML file**                | Complete machine logic as a structured export                          |
| ✅ **Automated control structure**               | Programs, blocks, variables automatically created in the target system |
| ✅ **Reduced programming effort**                | No manual code creation required – model = code                        |
| ✅ **Model ↔ PLC synchronization**               | Re-import and comparison possible, changes traceable                   |
| ✅ **Error prevention through model fidelity**   | Deviations between planning and control are minimized                  |
| ✅ **Basis for HMI, diagnostics, commissioning** | Unified data basis for all further steps in the project lifecycle      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://infosys.selmotech.com/selmo-solution/selmo-solution-en/selmo-structure-and-standard/selmo-technical-standard-and-structure/selmo-method-in-practice/plcopen-xml-export-and-import-with-selmo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
