Semantic Warning (SEM2004, SEM2005, SEM2006): The POU '...' is not used.
A user-defined POU contained in the folder 'COMPONENTS | Programming > Local > 'Functions & Function Blocks' or 'Programs' is not used in the project.
If the warning is reported for a ...
- function or FB POU, this means that the indicated FU/FB is not called from any other POU (in case of an FB: it is not instantiated anywhere). To call a POU in another POU, open the code worksheet of the calling POU and insert the FU/FB to be called into the code. In case of an FB call, an instance name has to be declared in the local 'Variables' table of the calling POU.
-
program POU, this means that no instance of this program is defined in any task. The assignment of programs to a task is done using the 'Tasks and Events' editor.
- Double-click the 'PLCnext' node in the PLANT (in programming mode) to open the 'PLCnext' editor group in the editors area. If the 'Tasks and Events' editor is not visible, left-click the editor label in the editor group tab.
- If required, create a new task in the 'Tasks and Events' table, by left-clicking into the 'Enter task / event ...' field and entering a name for the task. Confirm your entry by pressing <Enter>. A cyclic task with default properties is added to the table. As no program instance is yet assigned to the new task, an error is reported in the Error List and the task is highlighted in red.Configure your task by selecting the task/event type and the corresponding properties.
- Assign the program to the task by dragging it from the COMPONENTS area on the table line in the 'Tasks and Events' editor or by selecting it from the 'Program Type' field.
Note
Program POUs that are not assigned to any task (by assigning a program instance to the task) are not executed when running the controller application.Further Info
For further information on tasks and how to edit them refer to the topic "Task Configuration".
This is a warning message to inform you about that important issue. Check the reason for this warning. If it is intended, no corrections are required as reaction to this message.