Reset

ITcEvent

The method is used to reset an event. Events that had be issued from the PLC function block (or other ADS device) or from a call to a Report Event Function like ITcEventLogC::ReportEvent,ITcEventC3::ReportEventEx or ITcEventLog::ReportEvent could be reset by this method call are directly from the PLC function block that issues the alarm.

If the event is reset the timestamps DateReset + MsReset will be assigned to the actual date + time.

 

HRESULT Reset();

Parameters

Return Values

S_OK

Function was successfully called

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

' reset the alarm
Call evt.Reset

Remarks

After this method call the Event Logger will raise the event OnResetEvent on all clients that implement the event interface _ITcEventLogEvents (VB: Dim WithEvents). If the alarm was issued by the PLC the TCEVENTSTATE_RESET will be flagged at the EventState output of the PLC function block.