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
SupervisorOperationGetEntry (FUN) ¶ FUNCTION SupervisorOperationGetEntry : POINTER TO SupervisorEntry Returns the SupervisorEntry of a given operation handle Error code: ERR_OK: The SupervisorEntry was successfully retrieved ERR_INVALID_HANDLE: The handle to the operation is invalid ERR_PARAMETER: The handle to the operation is invalid InOut: Scope Name Type Comment Return SupervisorOperationGetEntry POINTER TO SupervisorEntry Pointer to SupervisorEntry of the given operation handle or NULL in case of an error Input hOperation RTS_IEC_HANDLE Handle to the operation pResult POINTER TO RTS_IEC_RESULT Pointer to error code
SupervisorOperationGetFirst (FUN) ¶ FUNCTION SupervisorOperationGetFirst : RTS_IEC_HANDLE Iteration interface to get the first registered operation Error code: ERR_OK: The first operation was successfully retrieved ERR_NOTINITIALIZED: The operation memory is not initialized ERR_NO_OBJECT: There are no registered operations InOut: Scope Name Type Comment Return SupervisorOperationGetFirst RTS_IEC_HANDLE Handle to the first operation or RTS_INVALID_HANDLE in case of an error Input pResult POINTER TO RTS_IEC_RESULT Pointer to error code