SysTaskCreate2
(FUN)
FUNCTION SysTaskCreate2 : RTS_IEC_HANDLE
<description>Is called to create a task in _suspended_ mode. SysTaskResume must be called afterwards!</description> <result><p>RESULT: Handle to the created task</p></result>
- InOut:
Scope
Name
Type
Comment
Return
SysTaskCreate2
RTS_IEC_HANDLE
Input
pszTaskName
REFERENCE 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>
pParam
POINTER TO SYS_TASK_PARAM
<param name=”pParam” type=”IN”>Pointer to the argument which is passed on entry, see SYS_TASK_PARAM->pParam</param>
ulPriority
UDINT
<param name=”ulPriority” type=”IN”>Priority of the task. Can be 0..255</param>
ulInterval
UDINT
<param name=”ulInterval” type=”IN”>Interval in microseconds</param>
ulStackSize
UDINT
<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>
pResult
POINTER TO RTS_IEC_RESULT
<param name=”pResult” type=”OUT”>Pointer to runtime system error code (see CmpErrors.library)</param>