Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
CmpSupervisor Library Documentation ¶ Company System Title CmpSupervisor Version 3.5.17.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder CmpSupervisor Description 1 ¶ This interface provides a generic and easy to handle supervisor for all vital operations in the runtime system. This interface can be used for example to retrigger a hardware watchdog to detect a failure in such a vital operation (in case of a software error). Interface can be used to: Register/unregister a vital operation for supervision Retrigger a vital operation to be alive There is an explicit dead signal for desperate situations such as memory overwrite, etc. For these operations stTimeoutUs should be set to 0 to disable time check Interfaces to read the global state of all vital operations and to interate over all vital operations Use case: Use supervisor to support a hardware watchdog: A cyclic task checks SupervisorOperationGetState() periodically and retriggers the hardware watchdog. In case the nNumOfFailedOperations is greater than 0 the cyclic task can just prevent the retriggering of the hardware watchdog so that it expires or check the causing operation and in the case it is not that important, give a second chance by reactivating its supervision. This is done by iterating through all operations by SupervisorOperationGetFirst(), SupervisorOperationGetNext(), and SupervisorOperationGetEntry() to find the causing operation and then by calling SupervisorOperationDisable() followed by SupervisorOperationEnable() to reactivate the supervision of the operation. Contents: ¶ EventIDs (GVL) EventParameter EVTPARAM_CmpSupervisor_StateChanged (Struct) SupervisorEntry (Struct) SupervisorFlags (GVL) SupervisorInstance (Struct) SupervisorOperationAlive (Function) SupervisorOperationDead (Function) SupervisorOperationDisable (Function) SupervisorOperationEnable (Function) SupervisorOperationGetEntry (Function) SupervisorOperationGetFirst (Function) SupervisorOperationGetNext (Function) SupervisorOperationGetState2 (Function) SupervisorOperationRegister (Function) SupervisorOperationSetTimeout (Function) SupervisorOperationUnregister (Function) SupervisorState (Struct) Indices and tables ¶ 1 Based on CmpSupervisor.library, last modified 20.04.2021, 15:56:21. LibDoc 4.4.0.0-b.27 The content file CmpSupervisor.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 15:56:21.
EventParameter ¶ EVTPARAM_CmpSupervisor_StateChanged (Struct)
EventIDs (GVL) ¶ Attributes: qualified_only InOut: Scope Name Type Initial Comment Constant CMPID_CmpSupervisor DWORD 16#8F ComponentID to specify for EventOpen EVTPARAMID_CmpSupervisor_StateChanged WORD 16#1 IDs for the event parameter structures EVTVERSION_CmpSupervisor_StateChanged WORD 16#1 EVT_Supervisor_StateChanged DWORD (SHL(UINT_TO_DWORD(EventClass.EVTCLASS_INFO), 16) OR 16#1) <category>Events</category> <description>Event is sent if the state of the supervisor has changed: if number of operations has changed or if at least one failed vital operation is detected </description> <param name=”pEventParam” type=”IN”>EVTPARAM_CmpSupervisor_StateChanged</param>
EVTPARAM_CmpSupervisor_StateChanged (STRUCT) ¶ TYPE EVTPARAM_CmpSupervisor_StateChanged : STRUCT <category>Event parameter</category> <element name=”nNumOfOperations” type=”IN”>Number of operations that are registered and supervised</element> <element name=”nNumOfFailedOperations” type=”IN”>Number of failed operations. 0=All operations alive</element> <element name=”nNumOfRegisteredOperations” type=”IN”>Number of all registered operations</element> Attributes: qualified_only InOut: Name Type nNumOfOperations UDINT nNumOfFailedOperations UDINT nNumOfRegisteredOperations UDINT
SupervisorEntry (STRUCT) ¶ TYPE SupervisorEntry : STRUCT Single operation/function that is supervised. InOut: Name Type Comment cmpId DWORD ComponentID of the component which operation is supervised ui32OperationID DWORD Unique operation ID pszOperationDescription POINTER TO STRING Description of the operation stLastActiveUs ULINT Timestamp of last activity in [us] stTimeoutUs ULINT Optional timeout limit in [us] flags DWORD See SupervisorFlags for details. Don’t modify the other bits!! bEnable BOOL Is supervised, FALSE=Is not supervised bAlive BOOL TRUE=Alive, FALSE=Dead instance SupervisorInstance Instance identification hSync RTS_IEC_HANDLE handle to synchronize 64Bit timestamp access
SupervisorFlags (GVL) ¶ Supervisor flags Attributes: qualified_only InOut: Scope Name Type Initial Comment Constant RTS_SUPERVISOR_FLAG_WATCHDOG UDINT 16#10000 This is a watchdog (consumer), that uses the supervisor to protect the controller!
SupervisorInstance (STRUCT) ¶ TYPE SupervisorInstance : STRUCT InOut: Name Type Comment hInstance RTS_IEC_HANDLE Handle to the instance idInstance UDINT Id of the instance xIsIECInstance BOOL TRUE=hInstance is an IEC instance, FALSE=hInstance is a runtime handle
SupervisorOperationAlive (FUN) ¶ FUNCTION SupervisorOperationAlive : RTS_IEC_RESULT Reassures the alive state of the operation with the given timestamp in order to retrigger the hardware watchdog InOut: Scope Name Type Comment Return SupervisorOperationAlive RTS_IEC_RESULT Error code Error code: ERR_OK: Alive state was successfully reassured ERR_NOTINITIALIZED: The operation memory is not initialized ERR_INVALID_HANDLE: The handle to the operation is invalid ERR_PARAMETER: The handle to the operation is invalid ERR_NO_CHANGE: Supervision is disabled for the operation ERR_NOT_SUPPORTED”>SysTimeGetUs is not supported Input hOperation RTS_IEC_HANDLE Handle to the operation pstTimestampUs POINTER TO ULINT Pointer to timestamp. May be NULL, if time check is enabled timestamp is set to current time.
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.04.2021, 15:56:50 companyName string 3S-Smart Software Solutions GmbH libraryFile CmpTls.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile CmpTls.clean.json version version 2.0.0.0 ProjectInformation ActivateSigning bool False IsCommonLibraryContainer True Released True LastModificationDateTime date 20.04.2021, 15:56:50 LibraryCategories library-category-list System|SysLibs Author string `` 3S - Smart Software Solutions GmbH `` Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Description See: Description DocFormat reStructuredText Placeholder CmpTls Project CmpTls Title CmpTls Version version 3.5.17.0