Skip to main content

Tasks

Tasks define how programs are executed within a resource. A task can execute programs periodically, cyclically, once after a trigger, or when an external event or counting condition occurs.

Task files are added to the Task folder of the resource. Each task file defines the execution behavior for the programs associated with it. A watchdog can also be configured to monitor task execution time. Each task has an associated system marker that can be used by the application to enable or disable task execution.

Main task

Each resource contains one predefined task named Main. This task cannot be deleted. The Main Ladder program runs in this task.

Screenshot note

The screenshots in this page are examples captured from a specific device configuration. The general task configuration workflow is reusable across supported devices, but available task types, event sources, digital input options, counters, and timing behavior may depend on the product.

Use the options available for the selected device and consult the product manual or the corresponding device section in the documentation when device-specific limits or resources are required.

Task Folder Actions

The Task folder menu provides actions for creating task files and configuring digital input transition behavior.

Task folder options menu

ActionDescription
New FileCreates a new task file inside the Task folder.
Configure DI TransitionOpens the digital input transition configuration window. Digital inputs can trigger events on a rising edge, falling edge, or both rising and falling edges.

Digital input transition settings are used by External Event and Count task types.

Digital input transition settings

Task File Actions

Each task file has an options menu for opening the task configuration and managing the program list associated with the task.

Task file options menu

ActionDescription
OpenOpens the task configuration window.
Programs SelectionOpens the program selection window, where programs can be added, removed, or reordered for the selected task.

Task Configuration

The task configuration window defines the execution behavior of the selected task.

Task configuration window

AreaPurpose
PriorityDefines the execution priority of the task.
Program ListDefines which programs are associated with the task and the order in which they execute.
Type of TaskDefines the condition that activates the task.
WatchdogDefines execution-time monitoring for the task.

Priority

Task priority is configured with a value from 0 to 30.

Priority ValueMeaning
0Highest priority
30Lowest priority

When a task with higher priority becomes active while a lower-priority task is running, the higher-priority task starts executing immediately. When a lower-priority task becomes active while a higher-priority task is running, the lower-priority task waits until the current task finishes.

Program List

The program list defines the programs executed by the task and their execution order.

Task program selection window

The left side of the selection window lists all programs available in the resource. The right side lists the programs selected for the task. Programs execute in the same order shown in the selected program list.

Task Types

The task type defines the activation condition for the task.

Task type selection

A System task runs on application lifecycle events. It can be configured as Initialization or Stop.

System task settings

System Task OptionExecution Behavior
InitializationExecutes when the user program starts for the first time.
StopExecutes immediately after the user program stops.

Digital Input And Counter Assignment

Digital input and counter assignment

Digital input and counter functions cannot be used simultaneously for the same set of digital inputs. A digital input operates either as a standard digital input or as a fast counter.

  • When an input or input set is configured as a fast counter, it cannot be selected to generate counting events.
  • When an input or input set is configured as a digital input, the associated fast counter cannot be selected.
Digital input configuration

Supported digital input configurations depend on the available device resources. Use the device manual to verify the supported digital input modes.

Watchdog

The watchdog monitors the execution time of a task.

Task watchdog settings

When the watchdog is enabled, the user program stops with an error alarm if the task execution time exceeds the configured Time for more occurrences than the configured Sensitivity.

FieldDescription
TimeMaximum task execution time allowed before a watchdog occurrence is registered.
SensitivityNumber of watchdog occurrences allowed before the error alarm is generated and the user program is stopped.
note

Some devices has a hardware Watchdog that will be triggered if any task takes more than two seconds to complete, even if the Watchdog option is disabled.

In this case, the device will restart in a safe state, with the application in STOP.