RegContext (STRUCT) ¶ TYPE RegContext : STRUCT <category>Register Context</category> <description> Contains the generic register context of a processor at a specified code execution position </description> InOut: Name Type Comment ulIP __UXINT <element name=”IP” type=”IN”>Instruction pointer or program counter</element> ulBP __UXINT <element name=”BP” type=”IN”>Base pointer or frame pointer</element> ulSP __UXINT <element name=”SP” type=”IN”>Stack pointer</element>
SYS_TASK_INFO (STRUCT) ¶ TYPE SYS_TASK_INFO : STRUCT <description>SYS_TASK_INFO</description> InOut: Name Type Comment uiOSHandle RTS_IEC_HANDLE <element name=”uiOSHandle” type=”IN”>Operating system handle of a task</element> iState DINT <element name=”iState” type=”IN”>Actual state of the task. See category “Task status definitions” for details.</element> iOldState DINT <element name=”iOldState” type=”IN”>Previous state of the task</element> TP SYS_TASK_PARAM <element name=”TP” type=”IN”>Task parameter, with which the task was created</element> ulCycleTime UDINT <element name=”ulCycleTime” type=”IN”>Last cycle time</element> ulCycleStart UDINT <element name=”ulCycleStart” type=”IN”>Start time of the cycle</element> ulPriority UDINT <element name=”ulPriority” type=”IN”>RTS priority of the task (not OS priority)</element> ulOSPriority UDINT <element name=”ulOSPriority” type=”IN”>Operating system priority of the task</element> ulInterval UDINT <element name=”ulInterval” type=”IN”>Specified interval for the task</element> ulStackSize UDINT <element name=”ulStackSize” type=”IN”>Specified stack size for the task</element> pFunction PFSYS_TASK_FUNCTION <element name=”pFunction” type=”IN”>Function pointer of the task frame</element> szName STRING(SYSTASK_MAX_NAME_LEN) <element name=”szName” type=”IN”>Name of the task</element> pExceptionHandler PFSYS_TASK_EXCEPTIONHANDLER <element name=”pExceptionHandler” type=”IN”>Specified exception handler of the task</element> Context RegContext <element name=”Context” type=”IN”>Current context of the task, if the task is supended</element> pCppInstance POINTER TO BYTE <element name=”pCppInstance” type=”IN”>Internal usage for C++</element> pOSSpecific POINTER TO BYTE <element name=”pOSSpecific” type=”IN”>Optional pointer to operating system specific stuff</element> ulFeature DWORD <element name=”ulFeature” type=”IN”>Features flags of the task. See category “FeatureFlags” for details.</element>
SYS_TASK_PARAM (STRUCT) ¶ TYPE SYS_TASK_PARAM : STRUCT <description>SYS_TASK_PARAM</description> InOut: Name Type Comment hTask RTS_IEC_HANDLE <element name=”hTask” type=”IN”>SysTask handle of the task</element> bExit DINT <element name=”bExit” type=”IN”>bExit flag to exit the task loop</element> ulInterval UDINT <element name=”ulInterval” type=”IN”>Specified interval of the task</element> pParam POINTER TO BYTE <element name=”pParam” type=”IN”>User specific parameter for the task</element>
FeatureFlags (GVL) ¶ InOut: Scope Name Type Initial Constant SYSTASK_FF_NONE DWORD 16#0 SYSTASK_FF_AUTORELEASEONEXIT DWORD 16#1
GVL (GVL) ¶ InOut: Scope Name Type Initial Comment Constant SYSTASK_MAX_NAME_LEN UDINT 19 Constant definition for the maximum length of a task
SysTaskAutoReleaseOnExit (FUN) ¶ FUNCTION SysTaskAutoReleaseOnExit : RTS_IEC_RESULT <description>The creator of a task can call this function to release the task object, if the task ends is execution. So the task is responsible itself to delete this object. NOTE: The task object must not be used from outside the task after calling this function!</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTaskAutoReleaseOnExit RTS_IEC_RESULT Input hTask RTS_IEC_HANDLE <param name=”hTask” type=”IN”>Handle to task</param>
SysTaskCheckStack (FUN) ¶ FUNCTION SysTaskCheckStack : RTS_IEC_RESULT <description>NOT IMPLEMENTED YET! Function to investigate the stack task. </description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTaskCheckStack RTS_IEC_RESULT Input hTask RTS_IEC_HANDLE <param name=”hTask” type=”IN”>Handle to task</param> pulMaxDepth POINTER TO UDINT <param name=”pulMaxDepth” type=”OUT”>Maximum stack depth</param>
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 SysTaskCreate RTS_IEC_RESULT Input pszTaskName REFERENCE TO STRING <param name=”pszTaskName” type=”IN”>The name of the task</param> pFunction PFSYS_TASK_FUNCTION <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 PFSYS_TASK_EXCEPTIONHANDLER <param name=”pExceptionHandler” type=”IN”>Function pointer to exception handler that is called after an exception has occurred in the task</param> phTaskHandle POINTER TO RTS_IEC_HANDLE <param name=”phTaskHandle” type=”OUT”>Handle to the created task</param>
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 PFSYS_TASK_FUNCTION <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 PFSYS_TASK_EXCEPTIONHANDLER <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>
SysTaskDestroy (FUN) ¶ FUNCTION SysTaskDestroy : RTS_IEC_RESULT <description>Is called to destroy the given task.</description> <result><p>RESULT: Returns the runtime system error code (see CmpErrors.library).</p></result> InOut: Scope Name Type Comment Return SysTaskDestroy RTS_IEC_RESULT Input hTask RTS_IEC_HANDLE <param name=”hTask” type=”IN”>Handle to task</param>