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.
- Generate a new (empty) text file with the extension .AWL
- 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:
- Open the structure definition file (e.g., VFD_struct.scl) and
copy its contents inside the AWL file
- Open the structure definition file (e.g., TempControl_struct.scl)
and copy its contents inside the AWL file
- 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";
- Remove the Default value settings of variables, e.g. { S7_SetPoint
:= 'True'} if present
- 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:
- Right-click on the block for which you want to generate the
sergeant
- Select the item 'Generate source from blocks'
- From the window that opens, choose the directory in which to
save the '.scl' file
- Choose the file name
- 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