RobotStudio event

class controller

Options
Hi people! I have a new problem. This time is for another exception. I want to get some data of the controller's cpu, but when I acces member MainComputerServiceInfo of the controller object, the program throws a exception: GenericControllerException and the message of the exception is: the URL used to initialize the helper does not resolve to a valid object.
I saw the help of PC SDK, but there aren't much information. Please, help me. Can you help me?

Source code:

     private void ConnectToController(object sender, MouseEventArgs e)
        {
             ListViewItem item = this.listView1.SelectedItems[0];
             if (item.Tag != null)
             {
                 ControllerInfo controllerInfo = (ControllerInfo)item.Tag;
                 if (controllerInfo.Availability == ABB.Robotics.Controllers.Availability.Available)
                 {
                     if (this.controller != null)
                     {
                           this.controller.Logoff();
                           this.controller.Dispose();
                           this.controller = null; ;
                     }
                     this.controller = ControllerFactory.CreateFrom(controllerInfo);
                     this.controller.Logon(UserInfo.DefaultUser);
                     MessageBox.Show("Te has conectado!");
                     ActualizarSenyal();
                     try
                     {
                          MainComputerServiceInfo infCPU;
                         
                          infCPU = this.controller.MainComputerServiceInfo;
                          
                     }
                     catch (ABB.Robotics.GenericControllerException ex)
                     {
                           MessageBox.Show(ex.Message);
                     }
                 }
                 else
                 {
                     MessageBox.Show("Selected controller not available.");
                 }
             }
        }

Thank you a lot.


Comments

  • Ingela
    Options

    Hi,

    The property can only be used when logged on to a real RC, but I guess you know that...

    Best regards,

    Ingela Brorsson
    Software Engineer
    ABB Robotics, Sweden
  • TEUTON
    Options
    Thank you, but my program logs on to a real RC. For this reason I don't know what is happening. 
  • RussD
    Options
    Do you have the same major version of RAB, i.e. 5.10.x and RobotWare installed on the robot, as well as the runtime environment of the target PC? All of these components need to be the same version to ensure full compatability.
    Russell Drown