SysTaskCreate (FUN)
FUNCTION SysTaskCreate : RTS_IEC_RESULT
<description>Is called to create a task in _run_ mode.</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result>
- InOut:
Scope
Name
Type
Comment
Return
SysTaskCreateRTS_IEC_RESULTInput
pszTaskNameREFERENCE TO STRING
<param name=”pszTaskName” type=”IN”>The name of the task</param>
pFunction<param name=”pFunction” type=”IN”>Function which implements the task: void func (SYS_TASK_PARAM/// pParam*)</param>
pParamPOINTER TO SYS_TASK_PARAM
<param name=”pParam” type=”IN”>Pointer to the argument which is passed on entry, see SYS_TASK_PARAM->pParam</param>
ulPriorityUDINT<param name=”ulPriority” type=”IN”>Priority of the task. Can be 0..255</param>
ulIntervalUDINT<param name=”ulInterval” type=”IN”>Interval in microseconds</param>
ulStackSizeUDINT<param name=”ulStackSize” type=”IN”>Stack size of task in bytes. 0=Default</param>
pExceptionHandler<param name=”pExceptionHandler” type=”IN”>Function pointer to exception handler that is called after an exception has occurred in the task</param>
phTaskHandlePOINTER TO RTS_IEC_HANDLE
<param name=”phTaskHandle” type=”OUT”>Handle to the created task</param>