beckhoff — 9.3.8.19 MsConfirmed

API 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 confirmation date and time Dim dateTime As Date dateTime = evt.DateConfirmed Debug.Print dateTime Remarks The event confirmation date and time is just set on those events that must be confirmed, see ITcEvent [ } 157] ::. MustConfirm [ } 169] 9.3.8.19 MsConfirmed ITcEvent [ } 157] The property returns the millisecond part of the event confirmation date and time.

The event confirmation date and time is the time when the event was confirmed from the PLC function block by setting EventQuit=TRUE (or other ADS device) or the from a call to ITcEvent [ } 157] ::. Confirm [ } 167] HRESULT MsConfirmed([out, retval] long *pVal); Parameters pVal [out, retval] Pointer to a long value that receives the millisecond part of the event confirmation date and time. Return Values S_OK Function was successfully called E_POINTER pVal 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 millisecond part of the event confirmation date and time Dim timeMs As Long timeMs = evt.MsConfirmed Debug.Print timeMs Remarks The millisecond part of the event confirmation date and time is just set on those events that must be confirmed, see ITcEvent [ } 157] ::. MustConfirm [ } 169] TcEventLogger 171 Version: 1.1