The import-scl command is designed to transform SCL code and UDTs (User-defined Data Types) from a TIA Portal project into ST code. This process automates many repetitive and time-consuming tasks.
Note
The process of converting UDTs into STRUCTs in ST code is straightforward and generally effective.
However, SCL code, with its history spanning over 20 years in TIA Portal and older tools, presents a more complex scenario. Given its nature as a language and its implementation across different target systems, SCL code has evolved numerous variants to express the same functionality.
As a result, achieving a fully automatic conversion is impossible. Some known restrictions are listed here.
The tool, therefore, provides only an initial conversion of SCL to ST code, aiming to reduce repetitive and tedious tasks. The complexity and age of the SCL code will influence the accuracy of the conversion. You may encounter errors in the resulting ST code that require manual correction.
Additionally, you might find it more attractive to rewrite your code using new features like OOP, rather than converting a large, historically evolved code bases in SCL mixed with other languages like LAD. This is especially true when appropriate documentation is lacking, making it challenging to get the code running again, or even if new architectural guide lines should be applied.
You might opt for a mixed approach, where some parts of the code are converted from old SCL code, while others are written anew.