Priority 0 = highest
Priority 31 = lowest
Example
Priority 0 will not be interrupted by any other task priority.
Priority 0 will interrupt a task with priority 1.
The configured BusTask would typically have the highest priority.
In combination with the task priority there is a Watchdog setting for each task. This can be handy to
use in order to make sure that a specific task doesn’t take longer then the specified time to execute.
If the time to execute is longer CODESYS will generate a watchdog error and STOP.
In the example below the task will generate and exception if time to execute is longer than 200ms.
In combination with the time setting a sensivity can be set. By setting 2 means that if 2 consecutive
executions takes more than 200ms to execute a watchdog error will be generated.
Performance tuning
To have a well functional system it is important to take notice of the overall cpu load for the
CODESYS core. The CODESYS runtime is bound to Core 1 and the load on that core can be
monitored by using the system tag available in iX Developer.
The recommended maximum load is approx. between 70-75% having a load higher than that
might lead to unwanted behavior especially in combination with EtherCAT communication.
The normal reason for having a high load would be the setup of task or tasks in the application,
and/or a lot of communicating tags more than 2000, from the HMI or the amount
A general approach is to have a minimum amount of active tasks, the type of task and also the
processing time for the task.
Note!