Remote controller and EventLog

Hello everyone,

I'm doing a C# application to work with local and remote controllers and I get an error when I try to get the event log of a remote controller.

This is my code:


        private void updateLog(Controller c)
        {
            List<System.String> listEvents = new List<System.String>();

            ABB.Robotics.Controllers.EventLogDomain.EventLogMessageCollection coleccion = null;
            ABB.Robotics.Controllers.EventLogDomain.EventLogCategory[] cat = c.EventLog.GetCategories();
           
            foreach (ABB.Robotics.Controllers.EventLogDomain.EventLogCategory el in cat)
                {
                  
                    if (el.Type.ToString() == "Operational")
                    {
                        coleccion = el.Messages;
                    }
                }

                foreach (ABB.Robotics.Controllers.EventLogDomain.EventLogMessage m in coleccion)
                {
                    listEvents.Add("[" + m.Timestamp.AddHours(2) + "] " + m.Title.ToString());
                }

                controllerFeatures.fillLogList(listEvents);               
        }

In this line:

            ABB.Robotics.Controllers.EventLogDomain.EventLogCategory[] cat = c.EventLog.GetCategories();

I get this exception when I work with a remote controller:

   en ABB.Robotics.Controllers.Internal.FileSystem.DemandExceptionFree(FileSystemCmd cmd)
   en ABB.Robotics.Controllers.Internal.FileSystem.PostProcessCmd(FileSystemCmd cmd)
   en ABB.Robotics.Controllers.Internal.FileSystem.EndDownloadFile(IAsyncResult ar)
   en ABB.Robotics.Controllers.Internal.FileSystem.Download(String source, String destination, Boolean overwrite)
   en ABB.Robotics.Controllers.Internal.FileSystem.DownloadToTemp(String source)
   en ABB.Robotics.Controllers.Internal.EventLog.Download(String path)
   en ABB.Robotics.Controllers.Internal.EventLog.DownloadAndParseCategories(String path)
   en ABB.Robotics.Controllers.Internal.EventLog.GetStaticCategories()
   en ABB.Robotics.Controllers.Internal.EventLog.LoadCategories()
   en ABB.Robotics.Controllers.Internal.EventLog.GetCategories()
   en ABB.Robotics.Controllers.EventLogDomain.EventLog.GetCategories()
   en Prototipo.Form1.updateLog(Controller c) en d:\Prototipo_v2\Prototipo_v2\Form1.cs:línea 1999
   en Prototipo.Form1.listView1_SelectedIndexChanged(Object sender, EventArgs e) en d:\Prototipo_v2\Prototipo_v2\Form1.cs:línea 2046
   en System.Windows.Forms.ListView.OnSelectedIndexChanged(EventArgs e)
   en System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   en System.Windows.Forms.ListView.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   en System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   en System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
   en System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
   en System.Windows.Forms.Control.WmNotify(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en System.Windows.Forms.ContainerControl.WndProc(Message& m)
   en System.Windows.Forms.Application.ParkingWindow.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   en System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   en System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   en System.Windows.Forms.Control.DefWndProc(Message& m)
   en System.Windows.Forms.ListView.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   en System.Windows.Forms.ListView.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   en System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   en System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   en System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   en System.Windows.Forms.Application.Run(Form mainForm)
   en Prototipo.Program.Main() en d:\Prototipo_v2\Prototipo_v2\Program.cs:línea 17
   en System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   en System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
   en System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
   en System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
   en System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
   en System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
   en System.Activator.CreateInstance(ActivationContext activationContext)
   en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
   en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   en System.Threading.ThreadHelper.ThreadStart()

Can anyone help me?

Thanks in advance!

Comments

  • I have a similar Problem.


    EventLog.GetCategories() throws an "File not found error" on real Controllers as well as on virtual machines. The only difference is that it takes much longer un real machines.


    Is there any Investigation on this Topic ?


    best regards

    Andreas Hessel

Sign In or Register to comment.