Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CmpApp ¶ Library Identification ¶ Placeholder: CmpApp Default Resolution: CmpApp, * (System) Namespace: CmpApp Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpApp SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
CmpAsyncMgr Library Documentation ¶ Company System Title CmpAsyncMgr Version 3.5.17.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder CmpAsyncMgr Description 1 ¶ Provides functions to execute operations in asynchronous tasks. An example can be downloaded here: Example.project Contents: ¶ ASYNCJOB_EVENTPARAM (Struct) ASYNCJOB_HOOKPARAM (Struct) ASYNCJOB_PARAM (Union) ASYNCJOB_TASKPARAM (Struct) AsyncAdd (Function) AsyncBaseClass (FunctionBlock) AsyncRemoveJob (Method) AsyncSetJobParams (Method) AsyncGetJobReturnValue (Function) AsyncKill (Function) AsyncRemove (Function) AsyncRemoveAll (Function) GVL (GVL) GVL_2 (GVL) Indices and tables ¶ 1 Based on CmpAsyncMgr.library, last modified 20.04.2021, 15:33:39. LibDoc 4.4.0.0-b.27 The content file CmpAsyncMgr.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 15:33:39.
ASYNCJOB_EVENTPARAM (STRUCT) ¶ TYPE ASYNCJOB_EVENTPARAM : STRUCT Specifiy the event that executes the job, in case ulType is set to ASYNCJOB_EVENT InOut: Name Type Comment ulEventId UDINT Event id ulEventClass UDINT Event class ulCmpId UDINT Component id that generates the event
ASYNCJOB_HOOKPARAM (STRUCT) ¶ TYPE ASYNCJOB_HOOKPARAM : STRUCT Specifiy the hook thats executes the job, in case ulType is set to ASYNCJOB_HOOK InOut: Name Type Comment ulHookId UDINT Hook id when the job should be executed, for example CH_COMM_CYCLE
ASYNCJOB_PARAM (UNION) ¶ TYPE ASYNCJOB_PARAM : union Union type, including all async job call definitions. InOut: Name Type TaskParam AsyncJob_TaskParam EventParam AsyncJob_EventParam HookParam AsyncJob_HookParam
ASYNCJOB_TASKPARAM (STRUCT) ¶ TYPE ASYNCJOB_TASKPARAM : STRUCT Specifiy task that executes the job, in case ulType is set to ASYNCJOB_TASK InOut: Name Type Comment pszTaskname POINTER TO STRING Task name of queue. Same task can be re-used for different jobs, or use separate tasks for different jobs. If name is not specified, a default name is generated based on the priority. ulTaskPriority UDINT Priority of task. ulTaskSleepTime UDINT Not used, set to 0. phTaskHandle POINTER TO RTS_IEC_HANDLE Handle of the task used for the job. Filled by AsyncAdd. Set to RTS_INVALID_HANDLE in the call. ulEndTaskAfterJob UDINT If set, task will be terminated after the job is finished.
AsyncAdd (FUN) ¶ FUNCTION AsyncAdd : RTS_IEC_HANDLE Function to start a new asynchronous job. Note On shutdown or reset, or before download, call AsyncRemoveAll() to remove all registered asynchronous jobs. During exit of an application (Application reset or delete), an asynchronous job is executed synchronously! InOut: Scope Name Type Comment Return AsyncAdd RTS_IEC_HANDLE Handle to the job object Input pfJobFunc POINTER TO BYTE Function pointer to be called asyncrononous. Use ADR to retrieve the function pointer. pParam POINTER TO BYTE Parameter to be passed to pfJobFunc pInstance POINTER TO BYTE In case of ulIecFunc is ASYNC_IS_IEC, and if pfJobFunc is a method of a FB, pass here the instance pointer of the FB In other cases, set to 0 pulState POINTER TO UDINT Pointer to job state, filled by CmpAsyncMgr. Check this state cyclically. ulIecFunc UDINT Indicates if pfJobFunc is written in IEC or C: ASYNC_IS_IEC or ASYNC_ISNOT_IEC ulType UDINT Type of an async job: ASYNCJOB_TASK, ASYNCJOB_EVENT or ASYNCJOB_HOOK ulTimeout UDINT Timout for the operation in milliseconds. Can be 0, then infinite. pAsyncJobParam POINTER TO ASYNCJOB_PARAM Pointer to structure ASYNCJOB_PARAM. Specify task by name with member TaskParam.pszTaskname. A new task will be created on first call. For other jobs, this same task can be re-used by setting the same name. Specify task priority with member TaskParam.ulTaskPriority. pResult POINTER TO RTS_IEC_RESULT Pointer to the runtime system error code (see CmpErrors2 Interface Library): ERR_PARAMETER: invalid parameter Result of CmpMemPool ERR_NOTIMPLEMENTED: ulType ASYNCJOB_EVENT and SysEvent handling fails ERR_NOT_SUPPORTED: ulType ASYNCJOB_TASK and SysTask handling fails
AsyncBaseClass (FB) ¶ FUNCTION_BLOCK AsyncBaseClass Function block to handle the asynchronous job. Methods: AsyncRemoveJob AsyncSetJobParams Structure: AsyncRemoveJob (Method) AsyncSetJobParams (Method)
AsyncBaseClass.AsyncRemoveJob (METH) ¶ METHOD AsyncRemoveJob : RTS_IEC_RESULT Method to remove a job. InOut: Scope Name Type Comment Return AsyncRemoveJob RTS_IEC_RESULT Returns the runtime system error code (see CmpErrors.library): ERR_OK: Job has been successfully removed ERR_FAILED: Job cannot be removed because it has been started ERR_PARAMETER: hJob is invalid ERR_PENDING: Job cannot be removed because it is active Input hJob RTS_IEC_HANDLE Handle to the job object.
AsyncBaseClass.AsyncSetJobParams (METH) ¶ METHOD AsyncSetJobParams : RTS_IEC_RESULT Method to set the job parameters. See AsyncAdd for documentation of the parameters. InOut: Scope Name Type Return AsyncSetJobParams RTS_IEC_RESULT Input ulAsyncJobType UDINT ulTimeout UDINT pAsyncJobParams POINTER TO ASYNCJOB_PARAM