Importing TAGS from Tia Portal - Possible Workaround

Introduction

It is possible to perform an import of the Tags of a Tia Portal project using the S7TCP driver import tool and generating manually an .AWL file from the individual SCL files generated by the TIA Portal program.
In practice, the Tia Portal, has the ability to generate individual files in SCL format (see the Appendix for its creation) that contain the structure of a DB and the related UDTs used, for example, in the DB itself.
The following is the procedure for generating the import file of the TAGs.

  1. Generate a new (empty) text file with the extension .AWL
  2. Open the Data Block definition SCL file and copy its its contents within the AWL file

If there are UDT definitions in the data block, it is necessary to then:

  1. Open the structure definition file (e.g., VFD_struct.scl) and copy its contents inside the AWL file
  2. Open the structure definition file (e.g., TempControl_struct.scl) and copy its contents inside the AWL file
  3. Within the AWL file you need to edit the lines regarding the "Data Block" and "Zone" in the manner:
    DATA_BLOCK "Data_block_2"
    where "Data_block_2" is the symbolic name given to the Data Block of index 2 and which must be replaced with "DB 2" to identify the absolute addressing of the DB:
    DATA_BLOCK DB 2
    and line:
    Zone : Array[1..4] of "TempControl";
    To make the array tag declaration compatible, with:
    Zone : ARRAY [1 .. 4] OF //Test
    "TempControl";
  4. Remove the Default value settings of variables, e.g. { S7_SetPoint := 'True'} if present
  5. The AWL file should then be ImportTiaPortal.awl which can be imported using the driver import tool S7TCP.

APPENDIX

HOW TO CREATE THE SCL SOURCE FILE

In TIA Portal V12 it is possible to generate a source file of a block written in SCL. To do this:

  1. Right-click on the block for which you want to generate the sergeant
  2. Select the item 'Generate source from blocks'
  3. From the window that opens, choose the directory in which to save the '.scl' file
  4. Choose the file name
  5. Click on the 'Save' button to save the file

Note: In case the Data Block use within the UDTs is present their definition in the Program Blocks tree, pertnate it is necessary to apply on esses the same procedure used for the Data Blocks
Note: On the TIA Portal 13 SP1 the function of Export SCL for Blocks. has changed the access point