> 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-struktur-und-standard/selmo-technischer-standard-und-struktur/selmo-methode-praktisch/plcopen-xml-export-und-import-mit-selmo.md).

# 🔷 PLCOpen XML – Export und Import mit Selmo

###

**Inputs – Was gemacht wird – Outputs**

***

#### 🔹 1. **Inputs – Was wird benötigt?**

| Kategorie                                | Beschreibung                                                                                                           |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Vollständig definiertes Selmo-Modell** | Logic- und System-Layer vollständig modelliert (inkl. Zonen, Bit-Control, Sequenzen, Parameter, Sicherheitsfunktionen) |
| **Projektstruktur / Zielarchitektur**    | Zielsystem definiert (z. B. Siemens TIA Portal, Codesys, Beckhoff) mit Namen, Ordnerstruktur, SPS-Benennung            |
| **Schnittstellenvorgaben SPS**           | Vorgaben für SPS-Konfiguration (z. B. Instanz-Namen, global/local, Signalstruktur)                                     |
| **HMI-Bindung (optional)**               | Optional: Zuordnung von Signalen, Tasten und Zuständen für die HMI                                                     |
| **Importprojekt (nur bei Rückimport)**   | XML-Datei aus SPS-Tool zur Rückübernahme (z. B. IBN-Daten, Erweiterungen)                                              |

***

#### 🔹 2. **Was wird gemacht? (Tätigkeiten beim Export/Import)**

| Schritt                               | Beschreibung                                                                                                                                      |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Export PLCOpen XML erzeugen**       | Das vollständige Modell wird als standardkonforme `.xml`-Datei ausgegeben                                                                         |
| **Struktur erzeugen**                 | Automatische Strukturierung in Instanzen, Funktionsbausteine, Variablen, Typen                                                                    |
| **Benennung & Zuordnung prüfen**      | Validierung von Namen, Datentypen, Pfaden, Kompatibilität zur Ziel-SPS                                                                            |
| **Import in SPS-Umgebung**            | XML wird in das SPS-Tool importiert (z. B. Codesys, TIA Portal), dort entstehen automatisch:                                                      |
| → Programme, Variablen, Logikstruktur |                                                                                                                                                   |
| **Rückimport XML (optional)**         | Bei Änderungen in der SPS kann das Projekt als XML exportiert und im Selmo Studio rückgelesen werden (z. B. Diagnoseoptimierung, Signalergänzung) |

***

#### 🔹 3. **Outputs – Was ist das Ergebnis?**

| Ergebnis                                 | Beschreibung                                                         |
| ---------------------------------------- | -------------------------------------------------------------------- |
| ✅ **PLCOpen-konforme XML-Datei**         | Vollständige Maschinenlogik als strukturierter Export                |
| ✅ **Automatisierte Steuerungsstruktur**  | Programme, Bausteine, Variablen im Zielsystem automatisch angelegt   |
| ✅ **Reduzierter Programmieraufwand**     | Keine manuelle Code-Erstellung nötig – Modell = Code                 |
| ✅ **Synchronisation Modell ↔ SPS**       | Rückimport und Vergleich möglich, Änderungen nachvollziehbar         |
| ✅ **Fehlervermeidung durch Modelltreue** | Abweichungen zwischen Planung und Steuerung werden minimiert         |
| ✅ **Grundlage für HMI, Diagnose, IBN**   | Einheitliche Datenbasis für alle weiteren Schritte im Projektverlauf |


---

# 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-struktur-und-standard/selmo-technischer-standard-und-struktur/selmo-methode-praktisch/plcopen-xml-export-und-import-mit-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.
