API Set evt = evtObj ' print the date and time Debug.Print evt.Date End Sub 9.3.5.5 OnActiveEventsCleared _ITcEventLogEvents [ } 144] This event method is called on all clients that implement and connect this event interface when all active events are cleared. This method is called after a call of ITcEventLog [ } 129] :: ClearActiveEvents [ } 131] or from the PLC function block ADSCLEAREVENTS with the iMode set to TCEVENTLOGIOFFS_CLEARACTIVE or TCEVENTLOGIOFFS_CLEARALL and on shutdown of the TwinCAT system.
HRESULT OnActiveEventsCleared(); Parameters S_OK Function was successfully called Visual Basic sample code Option Explicit Dim WithEvents evtLogger As TCEVENTLOGGERLib.TcEventLog ' form load Private Sub Form_Load() ' get the one and only event logger Set evtLogger = New TcEventLog End Sub ' event method Private Sub evtLogger_OnActiveEventsCleared() Debug.Print "Active Event are cleared!" End Sub 9.3.5.6 OnLoggedEventsCleared _ITcEventLogEvents [ } 144] This event method is called on all clients that implement and connect this event interface when all logged events are cleared. This method is called after a call of ITcEventLog [ } 129] ::
ClearLoggedEvents [ } 137] or from the PLC function block ADSCLEAREVENTS with the iMode set to TCEVENTLOGIOFFS_CLEARLOGGED or TCEVENTLOGIOFFS_CLEARALL. HRESULT OnLoggedEventsCleared(); Parameters S_OK Function was successfully called Visual Basic sample code Option Explicit Dim WithEvents evtLogger As TCEVENTLOGGERLib.TcEventLog ' form load Private Sub Form_Load() ' get the one and only event logger Set evtLogger = New TcEventLog End Sub TcEventLogger 148 Version: 1.1