5. Initial Programming
235
POU
– Task Connection
As described previously, for a POU to be executed in the application, it must be connected to a task.
In the project profiles (except Custom), the POUs are already associated to its respective tasks. In
case new POUs are created, make sure they are connected to the tasks.
To associate a new POU to a task, access it by clicking on it twice, and then choose “Add POU”. The
“Input Assistant” screen called will appear, where you must select the desired POU (Figure 5-16):
Figure 5-16. Connecting POUs to Tasks
You can also call a POU from another POU, which is already instantiated in the program. See the
example below, where POU_Test is called inside the area intended to code of UserPrg POU:
POU_Test();
Maximum Number of Tasks
The maximum number of tasks the user can create is only defined for the Custom profile, the only
one that has this permission. The others already have their tasks created and configured.
Table 5-6 describes the maximum IEC task quantity per CPU and project profile, where the protocol
instances are also considered communication tasks by the CPU.