EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Configuration of a Specific Task

Overview

When you insert a task in the Task Configuration node of the Applications tree, the task editor view for setting the task configuration opens with the Configuration tab.

It also opens if you double-click an available task (for example, MAST) in order to modify the configuration of the task.

NOTE: You can modify the task name by editing the respective entry in the Applications tree.

Insert the desired attributes.

Priority

Priority (0...31)

A number from 0...31; 0 is the highest priority, 31 is the lowest

The default value for new tasks is defined by your controller.

NOTE: Consider the controller-specific task settings to find appropriate settings for your application tasks. This may be important when assigning priority to tasks dedicated to communications, and its relation to topics such as cyber security. You can increase system robustness by setting application tasks to a higher priority than communication tasks.

Type

The target device defines which task types are supported. Not all types are available for some target devices. Consult the Programming Guide specific to your controller for more information.

Cyclic

The task will be processed cyclic according to the time definition (task cycle time) given in the field Interval (see below).

Event

The task will be started as soon as the variable defined in the Event field gets a rising edge.

Freewheeling

The task will be processed as soon as the program is started and at the end of one run it will automatically be restarted in a continuous loop. There is no cycle time defined.

External

The task will be started as soon as the system event, which is defined in the External Event field, occurs. It depends on the target, which events will be supported and offered in the selection list. (Not to be mixed up with system events.)

Status

The task will be started if the variable defined in the Event field is TRUE.

Obligatory Entries Depending on Task Type

Entry

Description

Interval (for example, t#200ms)

Obligatory for task type Cyclic.

The time (in milliseconds [ms]]) after which the task should be restarted.

When you set the task cycle time, consider the bus system used by the application. For example, on a CAN bus system, you can set the Bus cycle task in the CANopen I/O Mapping tab. The task cycle time must match the transmission rate and the number of frames used on the bus. Additionally, the times set for heartbeat, nodeguarding and sync always should be a multiple of the task cycle time. Otherwise, CAN frames may go unrecognized. For further information, refer to the Device Editor part of the EcoStruxure Machine Expert online help.

Event

Obligatory for type Event or triggered by an External event.

A global boolean variable which will trigger the start of the task as soon as a rising edge is detected. Use button ... or the Input Assistant to get a list of all available global event variables.

NOTE: If the event that is driving a task stems from an entry, there must be at least one task which is not driven by events. Otherwise, the I/Os will never get updated and the task will never get started.

NOTE: Only internal IEC variables are permitted. Referencing a property (including system parameter) in an event task will lead to a watchdog exception error being detected during download.

Difference Between Status and Event

The specified event being TRUE fulfills the start condition of a status driven task, whereas an event driven task requires the change of the event from FALSE to TRUE. If the event changes too fast from TRUE to FALSE and back to TRUE, then this event may be left undetected and thus the Event task will not be started.

The following example illustrates the resulting behavior of the task in reaction to an event (green line):

G-SE-0025893.1.gif-high.gif

 

 

At sampling points 1...4 tasks of different types show a different reaction:

Behavior at Point:

1

2

3

4

Status

No start

Start

Start

Start

Event

No start

Start

No start because the event changed too fast from TRUE to FALSE and back to TRUE

No start

Watchdog Settings

For each task, you can configure a time control (watchdog).

The default watchdog settings depend on your controller.

When the Enable option is activated (check mark is set), the watchdog is enabled. When the task watchdog is enabled, an Exception error is detected if the execution time of the task exceeds the defined task time limit (Time). The application that contains the task in which the error occurred and the corresponding child applications are stopped. This has the effect that the tasks of these applications are also stopped. The defined Sensitivity is taken into account. If option Update IO while in stop is enabled in the controller settings dialog box, the outputs are set to the pre-defined default values depending upon the particular controller platform. This function is not available for all supported controllers. Consult the Programming Guide specific to your controller.

The following cases may occur:

oSeveral consecutive timeouts:

oSensitivity: 0, 1 - exception in cycle 1

oSensitivity: 2 - exception in cycle 2

oSensitivity: n - exception in cycle n

NOTE: The upper bound of Sensitivity (n) is controller dependent. For more information concerning Sensitivity, Task time and other relevant parameters, consult the Programming Guide for your controller, chapter System and Task Watchdog.

oSingle timeout: Exception if the cycle time of the present cycle is longer than (task time limit * sensitivity).

Example:

Time=t#10 ms, Sensitivity=5 (An exception is indicated as soon as the task is running longer than 50 ms.)

Time (e.g. t#200ms)

Defines the allowable maximum execution time for a task. When a task takes longer than this, the controller will report a task watchdog exception.

Sensitivity

Defines the number of task watchdog exceptions that must occur before the controller detects an application error.

NOTE: The watchdog function is not available in simulation mode.

Consult the Programming Guide specific to your controller, chapter System and Task Watchdog, for information on task time, sensitivity and other possible watchdog parameters.

POUs

The POUs which are controlled by the task are listed here in a table with the POU name and an optional Comment. Above the table there are commands for editing:

oIn order to define a new POU, open the Input Assistant dialog box via the command Add Call. Choose 1 of the programs available in the project. You can also add POUs of type program to the list by drag and drop from the Applications tree.

oIn order to replace a program call by another 1, select the entry in the table, open the Input Assistant via command Change Call.. and choose another program.

oIn order to delete a call, select it in the table and use the command Remove Call.

oThe command Open POU opens the selected program in the corresponding editor.

The sequence of the listed POU calls from top to bottom determines the sequence of execution in online mode. You can shift the selected entry within the list via the commands Move up and Move down.