General Information Permalink

input data is read at the beginning of each IEC task (1), and output data is transferred to the I/O driver at the end of the task (3). The implementation of the I/O driver determines how and when I/O data is transferred.It is responsible for the timing and scheduling of the actual data transfer to the corresponding bus system.

The PLC bus cycle task can be configured globally for all fieldbuses in the PLC settings. For some fieldbuses,this setting can be configured independently of the global setting. The task with the shortest cycle time is used as the bus cycle task (PLC setting: “unspecified”). Messages are normally transmitted on the bus by this task.

Other tasks only copy I/O data from an internal buffer that is exchanged with the physical hardware by the bus cycle task.

_task_diagram_standard.png

(1) Read inputs from input buffer

(2) IEC task

(3) Write outputs to output buffer

(4) Bus cycle

(5) Input buffer

(6) Output buffer

(7) Copy data to/from bus

(9) Bus cycle task, priority 1, 1 ms

(10) Bus cycle task, priority 5

(11) Bus cycle task, priority 10, interrupted by task 5

Task usage

The “Task Deployment” tab provides an overview of used I/O channels, the configured bus cycle task andnchannel usage.

WARNING

WARNING
WARNING
WARNING

WARNING

WARNING

Do not use the same input or output in multiple tasks.

Using the same inputs or outputs in multiple tasks can lead to unexpected behavior and is generally not recommended.

If an output is written by multiple tasks, the resulting state is undefined because the value can be overwritten by any of the tasks.

If the same input is used in multiple tasks, the value may change during task execution. This can occur when a task is interrupted by a higher-priority task that causes the process image to be updated. To avoid this situation, copy input values to local variables at the beginning of the IEC task and use the local variables throughout the remainder of the code.