RobotStudio event

One or two controllers

Options
I have two robotcells each with teir own IRC5 that I want to communicate with from my PC.
Should I use one or to controllers in my program?

Comments

  • Henrik Berlin
    Options
    RobotStudio can connect Online to your real (physical) IRC5 controller (RC) over Ethernet, either over the LAN (requires the RobotWare option PC Interface) or through the service port.
     

    In addition RobotStudio can be used for Offline programming by using one or several virtual controllers (VC) running in your PC.

     

    So, if you want to do Offline programming of your IRC5 controllers (RC) you should create one Virtual Controller (VC) for each RC. I recommend you to try the feature "Go Offline" of the Online tab that will automatically create a matching VC for your RC. 
    Henrik Berlin
    ABB
  • OOps should have explained better.
    I have a program on my PC wich is online communicating with two IRC5.
    I have a problem that after a IRC has been lost, I get an exception when I triy to logon when it has been found again.
    Whats wrong?
    private void AddControllerToListView(object sender, NetworkWatcherEventArgs e)
            {
                string tmp;
                int i = 0;
                try
                {
                    ControllerInfo controllerInfo = e.Controller;
                    ListViewItem item = new ListViewItem(controllerInfo.IPAddress.ToString());
                    item.SubItems.Add(controllerInfo.Id);
                    item.SubItems.Add(controllerInfo.Availability.ToString());
                    item.SubItems.Add(controllerInfo.IsVirtual.ToString());
                    item.SubItems.Add(controllerInfo.SystemName);
                    item.SubItems.Add(controllerInfo.Version.ToString());
                    item.SubItems.Add(controllerInfo.ControllerName);
                    this.listView1.Items.Add(item);
                    item.Tag = controllerInfo;

                    if ( e.Controller.IPAddress.ToString() == "192.168.51.12" )
                    {
                        MyGetController_2();                    
                    }
                }
                catch (Exception u)
                {
                    tmp = string.Format("ERROR: {0}", u.ToString());
                    ErrLog(tmp);
                }
            }

            private void RemoveControllerFrListView(object sender, NetworkWatcherEventArgs e)
            {
                string tmp;
                try
                {
                    foreach (ListViewItem item in this.listView1.Items)
                    {
                        if ((ControllerInfo)item.Tag == e.Controller)
                        {
                            this.listView1.Items.Remove(item);
                            break;
                        }
                    }
                }
                catch (Exception u)
                {
                    tmp = string.Format("ERROR: {0}", u.ToString());
                    ErrLog(tmp);
                }
            }

            public bool MyGetController_2( )
            {
                string  tmp;
                try
                {
                    int i = -1;

                    int iNr = listView1.Items.Count;
                    for(;;)
                    {
                        i++;
                        if ( i >= iNr )
                            break;

                        ListViewItem itemView = listView1.Items;
                        if ( itemView.Tag != null )
                        {
                            if ( itemView.Text == "192.168.51.12" )
                            {
                                ControllerInfo controllerinfo = (ControllerInfo) itemView.Tag;
                                if (controllerinfo.Availability == Availability.Available)
                                {
                                    if (this.m_ctrl_2 != null)
                                    {
                                        this.m_ctrl_2.Logoff();
                                        this.m_ctrl_2.Dispose();
                                        this.m_ctrl_2 = null;
                                    }
                                    this.m_ctrl_2 = ControllerFactory.CreateFrom(controllerinfo);
                                    this.m_ControllerInfo_2 = controllerinfo;
                                    this.m_ctrl_2.Logon(UserInfo.DefaultUser);
                                }
                                else
                                {
                                      SysLog( "MyGetController_2, IP not available" );                                 
                                      return false;
                                }
                            }
                        }
                    }
                    return false;
                }
                catch (Exception e)
                {
                    tmp = string.Format("ERROR: {0}", e.ToString());
                    ErrLog(tmp);
                    return false;
                }
            }








    Bulletin Board Software by Web Wiz ForumsAr version 9.53
    Copyright Ac2001-2008 Web Wiz

  • Henrik Berlin
    Options
    Moved to Developer Support.
    Henrik Berlin
    ABB
  • Can you please screen dump/upload the exception.
    Lennart H
  • uffe
    Options
    Ser du nA?got konstigt i koden?
    Hade du gjort likadant?

    mvh
    Ulf