https://support.industry.siemens.com/cs/document/79168964/import-external-source-files-into-tia-portal-and-generate-blocks-from-them?dti=0&lc=en-AE

REIHENFOLGE DES IMPORTS (Sehr wichtig!):
1. PLC-Datentypen (UDTs) 
2. PLC-Variablen 
3. Programmbausteine (FC/FB/DB)
-------------------------------------------------------------------------------- 
SCHRITT 1: PLC-DATENTYPEN (UDTs) IMPORTIEREN 
-------------------------------------------------------------------------------- 
1. In der Ziel-Version in den Ordner "Externe Quellen" navigieren. 
2. Doppelklick auf "Neue externe Datei hinzufügen". 
3. Die .udt-Datei (oder .scl-Datei) auswählen. 
4. Rechtsklick auf die Datei in "Externe Quellen" -> "Bausteine aus Quelle generieren". 
	-> Der UDT erscheint nun im Ordner "PLC-Datentypen".
--------------------------------------------------------------------------------
SCHRITT 2: PLC-VARIABLEN IMPORTIEREN 
-------------------------------------------------------------------------------- 
1. Ordner "PLC-Variablen" öffnen. 
2. Eine Variablentabelle öffnen (oder neue anlegen). 
3. In der Menüleiste der Tabelle auf das "Import"-Icon (Pfeil nach Links) klicken. 
4. Die PLC-Variablen exportierte Datei (.xlsx) auswählen. 
	-> Die Variablen sind nun verknüpft (auch mit den UDTs aus Schritt 1). 
-------------------------------------------------------------------------------- 
SCHRITT 3: PROGRAMMBAUSTEINE (FC/FB) IMPORTIEREN 
-------------------------------------------------------------------------------- 
1. Wieder in den Ordner "Externe Quellen" gehen. 
2. Die .scl-Datei des Bausteins über "Neue externe Datei hinzufügen" einlesen. 
3. Rechtsklick auf die Datei -> "Bausteine aus Quelle generieren". 
	-> Die Bausteine erscheinen nun unter "Programmbausteine".

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

IMPORT ORDER (Very important!)
1. PLC data types (UDTs)
2. PLC tags
3. Program blocks (FC/FB/DB)
--------------------------------------------------------------------------------
STEP 1: IMPORT PLC DATA TYPES (UDTs)
--------------------------------------------------------------------------------
1. In the target version, navigate to the folder "External sources".
2. Double-click "Add new external file".
3. Select the .udt file or .scl file.
4. Right-click the file under "External sources" and select: -> "Generate blocks from source".
   -> The UDT now appears in the folder "PLC data types".
--------------------------------------------------------------------------------
STEP 2: IMPORT PLC TAGS
--------------------------------------------------------------------------------
1. Open the folder "PLC tags".
2. Open an existing tag table or create a new one.
3. In the menu bar of the table, click the "Import" icon.
   The import icon is the arrow pointing to the left.
4. Select the exported PLC tag file (.xlsx).
   -> The tags are now linked, also with the UDTs from Step 1.
--------------------------------------------------------------------------------
STEP 3: IMPORT PROGRAM BLOCKS (FC/FB/DB)
--------------------------------------------------------------------------------
1. Go back to the folder "External sources".
2. Add the .scl file of the block using "Add new external file".
3. Right-click the file and select:
   "Generate blocks from source".
   -> The blocks now appear under "Program blocks".