Task Configuration

A Task is a time unit in the processing of an IEC program. It is defined by a name, a priority and by a type determining which condition will trigger the start of the task. This condition can be defined by a time only (cyclic).

For each task you can now specify a series of programs that will be started by the task.

The combination of priority and condition will determine in which choronological order the tasks will be executed.

In the Online Mode the task processing can be monitored in a diagram.

The Task Configuration is found as an object in the Ressources register card the Object Organizer. The Task editor is opened in a bipartited window.

Task Configuration 1:

In the left part of the window the tasks are represented in a configuration tree. At the topmost position you will always find the entry 'Taskconfiguration'. Below there are the entries for the particular tasks, represented by the task name. Below each task entry the assigned program calls are inserted.

In the right part of the window a dialog will be displayed which belongs to the currently marked entry in the configuration tree. Here you can configure the tasks and program calls.

Notice

Data loss

Please do not use the same string function in several tasks, because this may cause program faults by overwriting.

Working with the Task Configuration

The most important commands you find in the context menu (right mouse button).

At the heading of the task configuration are the words "Task Configuration." If a plus sign is located before the words, then the sequence list is closed. By doubleclicking on the list or pressing <Enter>, you can open the list. A minus sign now appears. By doubleclicking once more, you can close the list again.

Further on for each entry in the configuration tree an appropriate configuration dialog will appear in the right part of the window. There options can be activated/deactivated resp. inputs to editor fields can be made. Depending on which entry is selected in the configuration tree, there will be the dialog for defining the 'Taskattributes' or the dialog for defining a 'Program Call'. The settings made in the dialogs will be taken over to the configuration tree as soon as the focus is set to the tree again.

A task name or program name can also get edited in the configuration tree. For this perform a mouseclick on the name or select the entry and press the <Space> button to open an edit frame.

You can use the arrow keys to select the previous or next entry in the configuration tree.

'Insert' 'Insert Task' or 'Insert' 'Append Task'

With this command you can insert a new task into the task configuration. If a task is selected, then the "Insert Task" command will be at your disposal. The new task will be inserted after the selected one. If the words Task Configuration are selected, then the "Append Task" is available, and the new task will be appended to the end of the existing list. The dialog box will open for you to set the task attributes.

Insert the desired attributes:

Freewheeling, triggered by event or triggered by external event: These task types are not supported!

Properties:

'Insert' 'Insert Program Call' or 'Insert' 'Append Program Call'

With these commands you will open the dialog box for entering a program call to a task in the task configuration. With "Insert Program Call", the new program call is inserted in front of the cursor, and with "Append Program Call", the program call is appended to the end of the existing list.

Task Configuration 2:

In the field, specify a valid program name for your project, or open the Input Assistant with the button... or with <F2> to select a valid program name. The program name can also get edited in the configuration tree. For this perform a mouseclick on the name or select the entry and press the <Space> button to open an edit frame. If the selected program requires input variables, then enter these in their usual form and of the declared type (for example, prg(invar:=17)).

'Extras' 'Set Debug Task'

With this command a debugging task can be set in Online mode in the task configuration. The text [DEBUG] will appear after the set task.
The debugging capabilities apply, then, only to this task. In other words, the program only stops at a breakpoint if the program is gone through by the set task. The setting of the Debug Task is stored in the project and will be set again automatically at log in / download.

Cancel the Debug Mode

To cancel the "Debug-Mode"

'Extras' 'Display Callstack'

If the program is stopped at a breakpoint during debugging, then this command can be used to show the callstack of the corresponding POU. For this purpose the debug task must be selected in the task configuration tree. The window 'Callstack of task <task name>' will open. There you get the name of the POU and the breakpoint position (e.g. "prog_x (2)" for line 2 of POU prog_x) . Below the complete call stack is shown in backward order. If you press button 'Go To', the focus will jump to that position in the POU which is currently marked in the callstack.