Sync tasks

A task is executed cyclically. Tasks can have different cycle times and are weighted with a priority. Different tasks can have the same cycle time, but not the same priority. Tasks with a higher priority can interrupt tasks with a lower priority. Tasks with short cycle times should therefore be given high priority. A low-priority task will resume as soon as CPU execution time is available and the priority list allows it.

An EtherCAT telegram contains up to 15 EtherCAT datagrams and is terminated by a frame check sequence. A Sync Task is assigned to a Sync Unit that synchronizes frames. If no Sync Task exists yet, a frame is synchronized by an unreferenced default Sync Unit.

The Real-time dialog can be called up in the "SYSTEM" subtree. The existing tasks are arranged according to priorities under the Priorities tab. If you press the "Optimize manually" button, existing tasks are sorted in the priority list: As a rule, the shorter the cycle time of a task, the higher priority it is assigned.

The "Sync Unit Assignment…" button is located in the EtherCAT Master dialog under the EtherCAT tab. It opens the "Sync Unit Assignment" dialog. The "Advanced Settings…" button is located in the EtherCAT Master dialog under the EtherCAT tab. The "Advanced Settings" dialog can be opened with the "Advanced Settings…" button. The "Cyclic Frames" subtree contains the "Sync Tasks" entry, which opens the Sync Tasks dialog.

In the Sync Tasks dialog, the maximum number of Sync Tasks can be set to 1, 2, 3 or 4 using the "Max Sync Tasks" NumericUpDown control. The default setting is 4. At the bottom of the Sync Tasks dialog, all the available Sync Tasks are entered in a table. The number of Sync Tasks cannot exceed the set maximum number. The table contains the name of a Sync Task and its cycle time, plus an assigned number.

A Sync Task is created when a Sync Unit has been assigned to the corresponding synchronizing task. Each time a Sync Unit is assigned to a synchronizing task, Sync Tasks are created in the order of priorities of synchronizing tasks and listed in the table at the bottom of the Sync Tasks dialog.

Sync Units can be assigned to a task in the "Sync Unit Assignment" dialog without a variable link. A Sync Unit is created even if a variable belonging to a task is linked to an unlinked slave device. A Sync variable is required in Run mode. If variables from different tasks are linked to a slave device, the task with the highest priority to which a Sync Unit is assigned synchronizes the slave device.

At least one cyclic frame for data transfer is created for each Sync Task. If many EtherCAT slave devices are present and many Sync Units are assigned to them, then more than four EtherCAT frames can be created. The additional frames are synchronized with the last frame that was synchronized by a Sync Task.

In the I/O tree under "Assignments" you will find a list indicating which tasks are assigned to which master device. If a Sync Task is assigned to a master device, the assignment symbol contains a double arrow.