Excluding Code Worksheets from Build
This topic contains the following sections:
General information
Several worksheets of a POU resp. all code worksheets of a POU can be excluded from compilation. This means, worksheets with this flag set will be ignored by the compiler during the build process. 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.
The following applies for excluded code worksheets in online and offline mode:
- The editor tabs of code worksheets are displayed strikedthrough (applies to offline and online mode).
- Code worksheets are shown read-only (grey background). Editing is not possible.
- In online mode, no online variables are shown for the excluded worksheets.
- In online mode, dragging and dropping variables to the WATCHES window, LOGIC ANALYZER window etc. is not possible.
- A POU with an excluded code worksheet can be released in a library. When using this POU from a released library in a project, the code worksheet is deactivated.
- Code worksheets from a library cannot be excluded from compilation.
- Code worksheets of a Safety PLC cannot be excluded from compilation.
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:
Command | Description |
---|---|
'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. |