Task Configuration
A task is a temporal sequence and control unit in an IEC program. It is defined by name, priority, type and a start condition. Either temporal conditions or an internal or external event can be defined for starting the task.
If a device is added to a project, a task configuration with a main task is automatically added for this device in the Program Structure (see “PLC_Task” Main Task). This calls one or several POUs. Call sequence is defined by the combination of priority and condition.
Time monitoring for each task can also be configured (watchdog). The setting options depend on the target system.
The task configuration is opened by double-clicking the appropriate entry in the Program Structure. The “Properties” tab shows the basic settings, such as maximum values for tasks and watchdog parameters.
The “Monitor” tab displays the status and current statistics for cycle times in online mode.
For additional information, see CODESYS online help: “Task Configuration Editor > Dialog‚ Properties”.
For some devices, such as panels, further tabs open in the "Task Configuration" tab:
In the "Task Groups" tab, new IEC task groups can be defined and distributed to several CPU cores ("Multicore"). For additional information, see CODESYS online help, index "Multicore".
In the "Core Load" tab, the processor utilization of the individual cores is shown graphically. This tab is only shown when the control is running ("Run").
Note
Create programs thread-safe!
Note that the distribution of IEC task groups across several cores is an expert function. Make sure that programs are thread-safe, so that individual program parts are not called several times by different programs and interfere with each other in their execution.
If you are uncertain, use the default setting on one CPU core.