One or two controllers
uffe
✭
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?
Should I use one or to controllers in my program?
0
Comments
-
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
ABB0 -
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;
}
}
0 -
Moved to Developer Support.Henrik Berlin
ABB0 -
Can you please screen dump/upload the exception.Lennart H0
-
Ser du nA?got konstigt i koden?
Hade du gjort likadant?
mvh
Ulf
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings