SysTaskCreateΒΆ

This function of type UDINT creates a new task. It will return an unique Id number for the task, which is required as an input parameter for the other functions of SysLibTask.lib.

Note

SysTask functions are not reentrant. This should be no problem in normal cases, but if in the application program a situation might occur, where several IEC-tasks create and manage additional tasks, the calls to these functions have to be synchronized. You can use the library SysLibSema in this case.

Input Variable Data type Description
stName STRING Name of the task
byPriority BYTE

Priority of the Task; possible values : 0-255,

Reserved: 0..31 for System

IEC-Tasks: 32..63

Communication -Tasks: 64 and higher

udiInterval UDINT Task interval in milliseconds
pfFunction DWORD Function pointer, which must be acquired with the aid of the function SysIECGetFctPointer()
pArgument DWORD Pointer to parameters for the new task