Task/Event Properties and Types (non-safety-related Controllers only)
This topic contains the following sections:
Task properties
The 'Tasks and Events' table defines the task properties. Depending on the selected task type, the following properties can be set for a task.
Note
Some task properties defined here are written to the TASK_INFOS system variable (device-dependent variable) which can be used for monitoring the application behavior. For details on the TASK_INFOS system variable, refer to the respective controller manual. |
Property | Description | |
---|---|---|
Name | Name of the task or program instance. For PLCnext Technology controllers, also the core names (ESMx) are listed in this column. | |
Task Type | The task type specifies the condition which starts the execution of the task. See the "Task/event types" description below for a list of the available types. |
|
Event Name | Event that triggers the execution of the task. Only available for Event Tasks. The task is started as soon as the selected event occurs. The selection list provides all predefined user events and system events.User events are defined by the user in a C++ program. Please refer to the controller documentation or the controller adaptation manual for information about available events.For a description of the available system events refer to the topic "System Event Tasks". | |
Program Type | Program that is assigned to the task (type of the instance).Left-clicking into the field opens the Role Picker. The tree on the left shows the structure of the program POUs as organized in the 'Programs' folder (COMPONENTS area). On the right, the available program POUs are provided for selection. | |
Interval (ms) | Time interval in ms in which the cyclic task is executed (integer or floating point value). Only available for cyclic tasks.The time value should be a multiple of the timer resolution of the target device.
|
|
Priority | Priority for calling the task (number between 0 and 15). 0 is the highest and 15 the lowest priority. The task with the highest priority is called first. | |
Threshold (ms) | Execution time threshold value in milliseconds. This value supports you in monitoring the application: If a value > 0 is specified and the task execution lasts longer than this threshold, the value of the EXEC_TIME_THRESHOLD_CNT variable (contained in the TASK_INFOS system variable) is incremented. Both the set threshold value and the threshold exceeded counter can be read out from the TASK_INFOS system variable which is contained in the ESM_DATA system variable (data structure) for monitoring purposes:
|
|
Watchdog (ms) | Maximum time a task is allowed to run for one cycle (call). If the watchdog time exceeds, a watchdog error is generated. This way, the watchdog monitors the execution and completion of a task within the defined time. The watchdog is executed during each system cycle.For cyclic tasks, the watchdog time normally should be shorter than the system cycle time.The valid value range depends on the target. Please refer to the device manual for minimum and maximum watchdog settings.
|
|
Comment | Comment for the core, task or program instance. |
Task types
Task type | Description | |
---|---|---|
Cyclic Task | The task is executed cyclically according to the time interval set in the 'Interval (ms)' field.Fixed program call intervals are important if, for example, the program is part of a control loop. Here, the interval influences the controller characteristic. | |
Idle Task | An Idle task is not time scheduled. It is executed if no other task with higher priority is currently executed.
|
|
Event TaskUser Event Task | Two different types of event tasks are distinguished: User event tasks and system event tasks.
|