Converting a program to another language

The Workbench includes a powerful feature that enables you to convert a program written in an IEC language to another language. When a program is selected in the Workspace or is open for editing, use the commands of the  "Tools / Convert program" menu to convert it.

Any conversion in between ST, IL, LD and FBD are possible. Conversion of SFC programs is not allowed. Converted POUs can be main programs, UDFBs or sub-programs.

The program must be saved and the project built without errors before converting a program.

When a program is converted to another language, its former implementation in the original language is kept until you make a change in the converted program. Thus, if you re-convert it back to the original language, you get 100% of the original contents.

Notes:

When a program is converted, some presentation items (such as blank lines in ST or specific alignment in FBD) are lost.

It is possible that converting a language requires some new intermediate variables to be declared. Such variables are declared locally to the program and are prefixed with "_T".