This functionality is only available for certain module packages.

You are here: EEC > PLC > Hardware configuration > Basic code objects > UDT fragments, loops, and replace parameter

UDT fragments, loops, and replace parameter

By means of the plug-socket design, fragments can be placed hierarchically below components of type User-defined data type.

When the code is created, the fragment contents can be added by means of control structures (e.g., (*{Code}*)) into the code of the instance of type User-defined data type.

Other control structures, such as LOOP and IF-THEN-ELSE, are also supported.

Note:

The improper use of control structures can cause the creation of invalid program elements.

A requirement for the correct configuration of control structures is that, in the resource of the component of type User-defined data type, the declaration area must have been exported as plain text.

Furthermore, when reading in the resource belonging to the fragment, correspondingly marked, so-called replace parameters (e.g., M8B_ReplaceParam_M8E) are automatically created. During the code generation, these are replaced in the created data as usual by the value of the parameter with the same name.