-

Task Configuration

This topic contains the following sections:

General information on tasks

Tasks define the runtime properties for programs and their FB instances. The tasks are coordinated and processed in the Execution and Synchronization Manager (ESM). By defining tasks, specifying their properties and assigning programs to tasks, the runtime behavior and the execution order for program POUs is defined. The order of the task execution is defined by the task priority and execution condition. The condition on which a task is executed is specified by the task type. A condition can be a time (in case of a cyclic task) or a user/system event.

One or more programs can be assigned to each task. The assignment defines which programs will be started when executing the corresponding task. Programs which are not assigned to any task are not executed.

Note
If a Safety PLC is included in your project, the PLCnext 'Task and Events' editor contains a SafetyProxyTask which has been created automatically. This SafetyProxyTask triggers the execution of the Safety PLC. This task cannot be edited or deleted.
Refer to the topic "Safety PLC Runtime Configuration" for details.

Note
There must be at least assigned one program to each task. Otherwise the system reports an error.

Note
The TASK_INFOS system variable (device-dependent variable) can be used for monitoring the application behavior. For details on the TASK_INFOS system variable, refer to the PLCnext Info Center and the respective controller manual.

The task configuration and the assignment of programs to a task is done using the 'Tasks and Events' editor that is opened as follows.
  1. In the PLANT (in programming mode), double-click the 'PLCnext' node.
  2. Left-click the 'Tasks and Events' editor in the editor group.

Example for a task configuration (AXC F 2152 controller)

Execution order of tasks and programs

Tasks and programs of non-safety-related controllers are executed according to their priority and condition (task cycle time or user/system event). For the execution order, the following applies:

You can modify the order of the tasks and program instances in the corresponding table as follows.
While holding down the mouse button, left-click the first table cell in the table line, drag the selection to the desired position in the table and drop it (multi-selection is also possible). Alternatively, select the line and use the Cut/Paste commands (available in the context menu or as keyboard commands) or use the icons on the 'Task and Events' editor toolbar:

Working with the 'Tasks and Events' table (non-safety-related controllers only)

The 'Tasks and Events' editor contains a hierarchically structured table where tasks and events can be specified and program instances can be assigned.

Entries in the table can be expanded and collapsed by clicking the appropriate icons and

Each core of the controller used is represented as ESM node in the table. By expanding an ESM entry, the contained tasks with their task properties become visible. Here, new tasks are added and configured.

Note
In debug mode, the controller Cockpit shows the utilization of each controller core (each represented by one ESM in PLCnext Engineer) besides the total controller utilization. Use this information during commissioning of your application to optimize the distribution of program instances to the available cores.

Search function

What do you want to do? (Procedures for non-safety-related controllers only)

Create and configure a task

Add a program instance by assigning a program to a task

Integrate externally developed non-IEC 61131-3 programs into the PLCnext Technology task scheduling

Move a program instance to another task by drag & drop