4 PLC configuration
4.3 Multi-tasking
Modular PLCs XControl: XC-104-…, XC-204-…, XC-303-… 01/23 MN050005EN Eaton.com 77
Figure 54: Programming a function
4.3 Multi-tasking
The XC300 runtime system is a multi-tasking system. In other words, multi-
ple tasks can be processed simultaneously.
Updating the input/output image table
If the local and central inputs/outputs are programmed in several tasks, the
input/output image table in XSOFT-CODESYS-3 will be updated according to
special rules:
By default, the only inputs read and outputs set before every task are the
ones used in the task.
In other words, the CPU does not work with an unchanging input/output
image table within a cycle. Instead, the input/output image table changes
within the cycle based on the task.
After the start, the system updates the inputs used (e.g., in the first task).
The name of the first task “Prog1” is in the Figure 56. If the system detects
an input that is connected to an XN300 slice module (e.g., XN322-16DI)
through the configuration, only this module input will be updated in the
image table. If this task has additional inputs that are assigned to other slice
modules, the inputs of these modules will be updated as well.
The same behavior applies to the outputs. if, for example, outputs QX6.0 and
QX7.1 of output module "1" are addressed by different tasks, the outputs of
this module will not only be updated by the first task. For instance, the first
task could set output QX6.0, while the second task could reset the output
based on a changed input image table.
Examples
The examples are based on the following configuration:
→
Further information concerning the system events can be found
in the online help of the programming system.
→
Do not access the same input or output from different tasks.