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.