-

Excluding Components from Build

This topic contains the following sections:

General information

You can exclude components when you build your project. Excluded components will not be compiled by the compiler during the build process. The exclude from build option is available for code worksheets of a POU, tasks and program instances, and network masters and its children devices. For example, for an FB POU where all worksheets are excluded from the build process, the FB POU and its formal parameters are part of the project image but not its code.

Excluding code worksheets from build

The following applies for excluded code worksheets in online and offline mode:

How to exclude worksheets from build process

The context menu of the code worksheet's editor tab provides the following commands to exclude a single worksheet or all worksheets of the POU from the build process:

CommandDescription
'Exclude from Build'Excludes the selected code worksheet from the build process.
The editor tab is displayed strikedthrough and the worksheet is in read-only mode.
'Deactivate Build of all Code Worksheets'Excludes all code worksheets of the POU from the build process.
All editor tabs of the code worksheets are displayed strikedthrough and the worksheets are in read-only mode.

The command is not available if all worksheets are already deactivated.
'Activate Build of all Code Worksheets'Activates the build of all code worksheets of the POU for the build process.

The command is not available if all worksheets are already activated.

Excluding tasks and program instances from build

When excluding tasks and program instances from the build, note the following:

You can exclude a single program instance or a task with its assigned program instances from the build using the 'Exclude from Build' command in the context menu of the corresponding PLANT node. When activated, the command entry is active and marked with a colored frame around the icon.

Excluding network masters and children nodes from build

When excluding network masters and children nodes from the build, note the following:

You can exclude a master or device from the build using the 'Exclude from Build' command in the context menu of the corresponding node. When activated, the command entry is active and marked with a colored frame around the icon.