This functionality is only available for certain module packages.

You are here: EEC > PLC > Program code > Insertion of code from child discipline components

Insertion of code from child discipline components

To insert the code from child discipline components into the code of an POU, the Plug-Socket principle is used in the comments.

In accordance with this principle, the comment is completely replaced by the code of the child component whose plug matches the specified socket.

For this purpose, the comment must contain a Replace parameter that carries the name of the socket.

In graphics languages, comments can be created within the code area only in networks. For this reason, not only the comment, but also the completely marked network is erased.

It is possible to specify multiple socket markers within the code. At each position marked in this way, only the code of the child components whose plug matches this socket is inserted. If there are multiple matching socket markers (same name), then the code for all of these markers is added.

If the child component is a reference, then a call to its referenced component is inserted instead of the code.

For components that are written with the language Structured Text (ST), the Plug-Socket principle can be used both in line comments and also block comments.