Confirm
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 ITcEventLogC::ReportEvent,ITcEventC3::ReportEventEx or ITcEventLog::ReportEvent with the TcEventFlags 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
Return Values
S_OK |
Function was successfully called
TCEVENTERR_NOCONFIRM |
The error was no confirmable error (TcEventFlags TCEVENTFLAG_REQMUSTCON was not set)
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
' confirm the alarm
Call evt.Confirm(TcEventConCodes.TCEVENTCON_OK)
Remarks
After this method call the Event Logger will raise the event OnConfirmEvent on all client that implement the event interface _ITcEventLogEvents (VB: Dim WithEvents). If the alarm was issued by the PLC the TCEVENTSTATE_CONFIRMED will be flagged at the EventState output of the PLC function block.