----------------------------------------------------------------------------------------------------------------------------------------------------------------
ENGLISH VERSION BELOW
----------------------------------------------------------------------------------------------------------------------------------------------------------------

REIHENFOLGE DES IMPORTS:
1. PLCopenXML-Datei importieren
2. Importierte Objekte prüfen
3. Baustein im Programm verwenden
--------------------------------------------------------------------------------
SCHRITT 1: PLCopenXML-DATEI IMPORTIEREN
--------------------------------------------------------------------------------
1. In TwinCAT 3 das Ziel-Projekt öffnen.
2. Das gewünschte PLC-Projekt öffnen.
3. Rechtsklick auf das PLC-Projekt oder auf den gewünschten Zielordner ausführen.
4. "Import PLCopenXML..." auswählen.
5. Die Datei "SmartAutomationInterface_PLCopenXML.xml" auswählen.
6. Den Import bestätigen.
   -> Die enthaltenen Datentypen, Bausteine und das Beispielprogramm werden importiert.

--------------------------------------------------------------------------------
SCHRITT 2: IMPORTIERTE OBJEKTE PRÜFEN
--------------------------------------------------------------------------------
1. Nach dem Import prüfen, ob die benötigten PLC-Datentypen / DUTs vorhanden sind.
2. Prüfen, ob die benötigten Programmbausteine / POUs vorhanden sind.
3. Prüfen, ob das Beispielprogramm "MainCall" vorhanden ist.

   -> Das Beispielprogramm "MainCall" enthält bereits die benötigten Variablen,
      die Bausteininstanz und eine Beispiel-Verschaltung in FBD.

--------------------------------------------------------------------------------
SCHRITT 3: BAUSTEIN IM PROGRAMM VERWENDEN
--------------------------------------------------------------------------------
1. Entweder das vorhandene Beispielprogramm "MainCall" verwenden
   oder die Deklaration und Verschaltung in das eigene Programm übernehmen.

2. Die Bausteininstanz muss im Programm vorhanden sein:

   FB_SmartAutomationInterface : FB_SmartAutomationInterface;

3. Die benötigten Eingangs- und Ausgangsstrukturen müssen mit den Prozessabbildern
   verbunden sein, zum Beispiel über AT %I* und AT %Q*.

4. Die benötigten Signale verschalten.

5. Projekt übersetzen:
   Build -> Rebuild Solution

   -> Der Baustein kann nun im PLC-Projekt verwendet werden.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

IMPORT ORDER:
1. Import the PLCopenXML file
2. Check the imported objects
3. Use the function block in the program
--------------------------------------------------------------------------------
STEP 1: IMPORT THE PLCopenXML FILE
--------------------------------------------------------------------------------
1. Open the target project in TwinCAT 3.
2. Open the required PLC project.
3. Right-click the PLC project or the required target folder.
4. Select "Import PLCopenXML...".
5. Select the file "SmartAutomationInterface_PLCopenXML.xml".
6. Confirm the import.
   -> The included data types, function blocks and the example program are imported.

--------------------------------------------------------------------------------
STEP 2: CHECK THE IMPORTED OBJECTS
--------------------------------------------------------------------------------
1. After the import, check that the required PLC data types / DUTs are available.
2. Check that the required program blocks / POUs are available.
3. Check that the example program "MainCall" is available.

   -> The example program "MainCall" already contains the required variables,
      the function block instance and an example FBD connection.

--------------------------------------------------------------------------------
STEP 3: USE THE FUNCTION BLOCK IN THE PROGRAM
--------------------------------------------------------------------------------
1. Either use the included example program "MainCall"
   or copy the declaration and connection into your own program.

2. The function block instance must be available in the program:

   FB_SmartAutomationInterface : FB_SmartAutomationInterface;

3. The required input and output structures must be connected to the process images,
   for example with AT %I* and AT %Q*.

4. Connect the required signals.

5. Build the project:
   Build -> Rebuild Solution

   -> The function block can now be used in the PLC project.