beckhoff — 9.3.8.14 Confirm

API Return Values S_OK Function was successfully called E_POINTER data was no valid pointer.

Visual Basic sample code ' get the one and only event logger Dim evtLogger As TCEVENTLOGGERLib.TcEventLog Set evtLogger = New TCEVENTLOGGERLib.TcEventLog ' get the most recent active event Dim evt As TcEvent Set evt = evtLogger.GetLastEvent ' get the event header Dim data() As Variant Call evt.GetHeader(data) ' loop though the list of data Dim i As Long For i = LBound(data) To UBound(data) Debug.Print data(i) Next i Remarks For C++ and Visual Basic programmers, it's more convenient to use the method ITcEventC [ } 137] ::GetHeader 9.3.8.14 Confirm ITcEvent [ } 157] The method is used to confirm an alarm.

Alarm that had be issued from the PLC function block (or other ADS device) or from a call to a Report EventFunktion like IT [ } 137]cEventLogC [ } 137] :: ReportEvent [ } 138] , ITcEventC3 [ } 141] :: ReportEventEx [ } 143] or ITcEventLog [ } 129] :: ReportEvent [ } 129] with the TcEventFlags [ } 180] TCEVENTFLAG_REQMUSTCON set have to be confirmed by a Confirm method call from COM client or from the PLC. HRESULT Confirm([in] long code); Parameters pVal [in] The confirmation code that is described through the enum TcEventConCodes TcEventLogger 167 Version: 1.1 index TcEventHeader [} 181] item DataType Description 8 varSource variant The source id source name.

The event source is used to distinguish different devices. Like I/O Event, or different parts of the PLC program. 9 szFmtProgId BSTR string The PrgId of the formatter. If we want to use the standard XML formatter the string should bet set to "TcEventFormatter.TcXmlFormatter"