RobotStudio event

Can I access virtual controller via network?

Options
I want connect to virtual controller running on another PC (under RobotStudio) but NetworkScanner (or Find) doesn't report it. I can see/connect only local virtual controllers.
Real controllers work fine.

Comments

  • Try to save the attached file "vcconf.xml" in the directory:

    C:Documents and SettingsAll UsersApplication DataABB Industrial ITRobotics ITRobVC

    Restart "RobNetScanHost.exe"

    Lennart H
  • kegley182
    Options
     


    RS 5.13; XP sp3

    clarification

    The RobVC folder didn't exist in "all users".. just my user folder... I created it in "all users" and put the xml file in both.

     

    Also, assume  restarting of "RobNetScanHost.exe" is on the PC with the virtual control running?... true?... restarted both PCs.

     

    Now, My app will find the virtual control just fine, But RS will not...  Is this expetcted? shouldn't RS find the virt control as well?  ... Tried "adding" using the IP address of the VC PC in RS's "add controller..." UI.   That didn't help
    Mike Kegley
  • kegley182
    Options
    Also, cannot logon using custom users in the UAS system... must use UserInfo.defaultuser
    and

    Virtual control is slow to scan/find... must perform a GetControllerInfo() in order to assure that the scanner.controllers contains the virtual control...
    Mike Kegley
  • kegley182
    Options
    partial solution on this is.... 
    It's not really taking that long... The output files are ready in about 2 seconds... and you can use them ...
    It's just VS doesn't come up with the "build succeeded" indicator for 10 minutes or so... and keeps VS in the "build progress" step...

     

    Anybody know what VS is doing during that time that it's already finished, but locked up in the build sequence?

     

     
    Mike Kegley
  • DanS
    DanS ✭✭
    Options
    I've been trying to make a remote VC work for some time now and was never able to figure it out.  I'm doing something like this and the remote VC never shows up:

    NetworkScanner ns = new NetworkScanner();
                ns.Scan();
                ControllerInfo[] ci = ns.GetControllers();

    I'm running Windows 7 64bit and have the Vcconf.xml file in these locations:

    C:Users<me>AppDataLocalABB Industrial ITRobotics ITRobVC
    C:Users<me>AppDataRoamingABB Industrial ITRobotics ITRobVC
    C:UsersAll UsersABB Industrial ITRobotics ITRobVC
    C:ProgramDataABB Industrial ITRobotics ITRobVC

    I'm restarted RobNetScanHost process on both computers.  Any advice out there?

    Thanks,
    Dan
  • kegley182
    Options
    My implemention connects to 8+ robots simultaneously... including VCs

    However, In my case the VC is on XP sp3... my app is on Win7 32bit(not 64)

     

    none-the-less, I'm thinking that you need to add the IP address via "AddRemoteController"... this would be the IPaddr of the PC hosting the VC

     

    Yes, this makes it IPaddr info dependant prior to application runtime, I have not gotten the VCs to show up without adding the IPaddr before the scan, although real controls do ...somethimes, so I just add them all (real or virtual
    ) and don't care about the robots' system names.

     

     

     

    ....below are some lines in sequence that I pulled from code that may hold some key to what you'r missing

     

    this.scanner = new NetworkScanner();
    NetworkScanner.AddRemoteController("<RobotIPaddress>"); //add a controller that is outside of the local network... (depends on router ip masking...etc) to add to the list of controllers to scan for... must be added first
    this.scanner.Scan();  //scan MUST be performed in order to connect... no scan... no connection  mk 6/28/10
    ControllerInfo[] listofcontrollerInfos;
    listofcontrollerInfos = scanner.GetControllers();

    aCntrolsInfo = listofcontrollerInfos[0];

    if (aCntrolsInfo.Availability = Availability.Available)
         {
              iRobotController = ControllerFactory.CreateFrom(aCntrolsInfo);
         }
    this.iRobotController.Logon(aUserInfo);








     

    I also use THIS(below) so that IF it's virtual control, I logon using the default user... as ABB has decided that there is no need for UAS capabilities on VCs ..

    if (controllerInfo.IsVirtual)
    {

    this.iRobotController.Logon(UserInfo.DefaultUser );

    }


    Sorry this is so, sketcy(non-syntaxual), but my implementation has a lot(pages) of code between these lines that I didn't think were important to the question.  Hope this helps

     

     

     
    kegley1822010-08-11 02:15:04
    Mike Kegley
  • DanS
    Options
    Hello,

    I recently took another look at this and was able to connect to a remote VC running on another computer.  I can do things like get the remote VC's DateTime and read I/O names, but I cannot retrieve error logs.  When I run this:

    myABBController.EventLog.GetCategory(CategoryType.Common);

    I get the exception shown below.

    Any suggestions would be helpful, thanks :)

    -Dan

    ABB.Robotics.GenericControllerException was unhandled
      Message= Error connect to controller.
      Source=ABB.Robotics.Controllers
      ExtendedErrorInformation=""
      StackTrace:
           at ABB.Robotics.Controllers.Internal.FileSystem.PostProcessCmd(FileSystemCmd cmd)
           at ABB.Robotics.Controllers.Internal.FileSystem.EndDownloadFile(IAsyncResult ar)
           at ABB.Robotics.Controllers.Internal.FileSystem.Download(String source, String destination, Boolean overwrite)
           at ABB.Robotics.Controllers.Internal.FileSystem.DownloadToTemp(String source)
           at ABB.Robotics.Controllers.Internal.EventLog.Download(String path)
           at ABB.Robotics.Controllers.Internal.EventLog.DownloadAndParseCategories(String path)
           at ABB.Robotics.Controllers.Internal.EventLog.LoadCategories()
           at ABB.Robotics.Controllers.Internal.EventLog.GetCategories()
           at ABB.Robotics.Controllers.EventLogDomain.EventLog.GetCategories()
           at ABB.Robotics.Controllers.EventLogDomain.EventLog.GetCategory(CategoryType type)
           at Wolf.Program.GetLogs() in C: empConsoleApplication2ConsoleApplication2Program.cs:line 74
           at Wolf.Program.Main(String[] args) in C: empConsoleApplication2ConsoleApplication2Program.cs:line 46
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: 



  • According to thread below is the GetCategory method obsolete
    http://forums.robotstudio.com/forum_posts.asp?TID=4384
    Lennart H
  • DanS
    Options
    I guess I simplified my example too much :)

    I've also tested this with things like

    categories = _ctrl.EventLog.GetCategories();
    _ctrl.EventLog.ClearAll();

    I guessing this is a problem with reading the log xml over a network connection (again...I'm using a remote VC).

    Thanks,
    Dan
  • msalminen
    Options
    Hi,
     

    Using Windows XP, 32bit and real robot controller.

    I am having same error ( Error connect to controller.) when calling EventLog.GetCategories();

     

     at ABB.Robotics.Controllers.Internal.FileSystem.PostProcessCmd(FileSystemCmd cmd)
       at ABB.Robotics.Controllers.Internal.FileSystem.EndDownloadFile(IAsyncResult ar)
       at ABB.Robotics.Controllers.Internal.FileSystem.Download(String source, String destination, Boolean overwrite)
       at ABB.Robotics.Controllers.Internal.FileSystem.DownloadToTemp(String source)
       at ABB.Robotics.Controllers.Internal.EventLog.Download(String path)
       at ABB.Robotics.Controllers.Internal.EventLog.DownloadAndParseCategories(String path)
       at ABB.Robotics.Controllers.Internal.EventLog.LoadCategories()
       at ABB.Robotics.Controllers.Internal.EventLog.GetCategories()
       at ABB.Robotics.Controllers.EventLogDomain.EventLog.GetCategories()

     

    Is there any answer to this?

     

    Regards,

    Mika
  • Laro88
    Options
    I have also observed that scanning takes a while, and sometimes it does not contain all available controllers.

    I have ended up running the scan a couple of times in a for loop looking at the count of controllers. If it is the same three times in a row then I consider the scan to be correct Wink
  • msalminen
    Options
    The problem AGAIN was the firewall.
     

    regards,

    Mika
  • KSP
    Options
    Anybody know where to find the attached Vcconf.zip. (The links seems to be broken :-( )
  • Svetlana
    Options
    Hi
    Could anyone please share the Vcconf.xml file?
    Best,
    Svetlana
  • Dmitry
    Options
    Hello Svetlana,
    From what i have found the vcconf.xml could look like this:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <hosts>
    <host ip="10.11.125.6" />
    <host ip="10.11.125.7" />
    <host ip="10.11.125.8" />
    </hosts>

    Located at C:\Users\{user}\AppData\Roaming\ABB Industrial IT\Robotics IT\RobVC