SysIECTaskGetConfig

This function of type BOOL serves to retrieve the configuration parameters of an IEC task.

The task is addressed by its name or its index, which it has got assigned in the task configuration. The structure SysIECTaskConfEntry contains all parameters which are used in the task configuration.

As soon as the task has been found, TRUE will be returned, otherwise FALSE.

Input Variable Data Type Description
udiTaskId UDINT Task Id (Index in the task configuration)
pTaskInfo POINTER TO SYSIECTASKCONFENTRY Information on the task configuration (structure, see below)

Structure SysIECTaskConfEntry:

TYPE SYSIECTASKCONFENTRY :

STRUCT

byTaskNr USINT; (* Task Number *)
byPriority USINT; (* Priority, see Dialog ‘Taskattributes’: ‘Insert’ ‘Insert Task’ or ‘Insert’ ‘Append Task’
lInterval DINT;

(* Interval of cyclic tasks, see Dialog ‘Taskattributes’: ‘Insert’ ‘Insert Task’ or ‘Insert’ ‘Append Task’

(* (in this case ldrEvent has an invalid entry) *)

ldrEvent LDATAREF_TYPE; (* IdrEvent represents address of event variable (by POURef, offset and size) *)
wIndex UINT;

(*If POU is called by task, then CoDeSys creates special wrapper _CallTask<TaskName> (also POU). *)

(*Returned Index corresponds to index of this POU. *)

uiNameLen UDINT; (* ulNameLen has a max. length of 32 characters (max. task name length) *)
szName STRING(80); (* Name of the task, see Dialog ‘Taskattributes’: ‘Insert’ ‘Insert Task’ or ‘Insert’ ‘Append Task’

END_STRUCT

END_TYPE

Structure LdataRef_Type:

TYPE LDATAREF_TYPE :

STRUCT

POURef UINT; POU-ID of the event variable
Offset UDINT; Offset for the event variable
Size UDINT; Size of the event variable

END_STRUCT

END_TYPE