Connectivity 5 Connectivity Certain pruduction environments may require the possibility for displaying events of certain machines on a host computer. The TcEventLogger does support two ways for implementing such systems: DCOM This is a propietary protocol developed by Microsoft. Method calls are serialized over the network so that one can call methods inside the remote TcEventLogger. This protocol is only avalable on Windows NT/ XP based systems. ADS Beckhoff has defined a binary protocol for exchange of event states and state callbacks. This protocol is supported on NT/ XP as well as on Windows CE.
Exchanging the communication layer during the development process or even at runtime is possible with minimal effort. 5.1 DCOM General The TcEventLogger does support DCOM connections to remote systems. DCOM allows to create a virtual local instance of an object which is physically running on a remote PC. By utilizing DCOM you can create an instance of a remote eventlogger and programatically query its active or logged events. EventViewer/ HMI The TcEventViewer ActiveX supports DCOM remote connections. Use the AddConnection method to attach to a remote eventlogger. The TcEventViewer supports connections to a virtually unlimited number of remote machines at a time.
Notes DCOM needs to be configured to allow access from another computer. Check the MSDN for further information. DCOM is not supported on Beckhoffs Windos CE based platforms. 5.1.1 DCOM Samples C++ void ConnectComputer(BSTR computer) { ITcEventLogPtr spTcEventLog COSERVERINFO comServerInfo={0}; comServerInfo.pwszName = computer; MULTI_QI mQI={&IID_ITcEventLog, NULL,0}; hr=::CoCreateInstanceEx( CLSID_TcEventLog, NULL, CLSCTX_SERVER, &comServerInfo, 1, &mQI); if ( SUCCEEDED(hr) ) { spTcEventLog =mQI.pItf; mQI.pItf->Release(); } //... } TcEventLogger 16 Version: 1.1