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>
EventParameter ¶ EVTPARAM_CmpSupervisor_StateChanged (Struct)
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.
SupervisorOperationDead (FUN) ¶ FUNCTION SupervisorOperationDead : RTS_IEC_RESULT Signals a desperate situation of an operation in order to prevent the retriggering of the hardware watchdog. After this call, the operation is marked immediate as failed! InOut: Scope Name Type Comment Return SupervisorOperationDead RTS_IEC_RESULT Error code Error code: ERR_OK: Dead state was successfully signalled 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 Input hOperation RTS_IEC_HANDLE Handle to the operation
SupervisorOperationDisable (FUN) ¶ FUNCTION SupervisorOperationDisable : RTS_IEC_RESULT Disables supervision for this operation. This operation will never be supervised, until the next SupervisorOperationEnable() call! InOut: Scope Name Type Comment Return SupervisorOperationDisable RTS_IEC_RESULT Error code Error code: ERR_OK: Supervision was successfully disabled 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: The operation is already disabled Input hOperation RTS_IEC_HANDLE Handle to the operation
SupervisorOperationEnable (FUN) ¶ FUNCTION SupervisorOperationEnable : RTS_IEC_RESULT Enables supervision for this operation: Sets timestamp to current time and alive flag InOut: Scope Name Type Comment Return SupervisorOperationEnable RTS_IEC_RESULT Error code Error code: ERR_OK: Supervision was successfully enabled 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: The operation is already supervised ERR_NOT_SUPPORTED”>SysTimeGetUs is not supported Input hOperation RTS_IEC_HANDLE Handle to the operation