beckhoff — 9.3.5.4 OnSignalEvent

API Function was successfully called E_POINTER evtObj was no valid pointer. 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_OnResetEvent(ByVal evtObj As Object) Dim evt As TcEvent Set evt = evtObj ' print the date and time of the reset Debug.Print evt.DateReset End Sub 9.3.5.4 OnSignalEvent _ITcEventLogEvents [ } 144] This event method is called on all clients that implement and connect this event interface when a event is signaled. Only events that have to be confirmed could be signaled.

A signaled event, is waiting for it's confirmation and was reset before. The event was signaled from the PLC function block ADSLOGEVENT by setting Event from FALSE to TRUE (or other ADS device) or the from a call to ITcEvent [ } 157] ::. Signal [ } 174] HRESULT OnSignalEvent([in] IDispatch* evtObj); Parameters evtObj [in] IDispatch pointer to a event object of the class TvEvent [ } 128] . The event object provide the full access to the signaled event. Each client receive a reference to the event object and no copy. Return Values S_OK Function was successfully called E_POINTER evtObj was no valid pointer.

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_OnSignalEvent(ByVal evtObj As Object) Dim evt As TcEvent TcEventLogger 147 Version: 1.1