RobotStudio 6.07+: Issues loading IRC5 controller on 64bit systems

SverrirSverrir Germany
edited September 2018 in Developer Tools
I'm developing a C# addin to the 64bit ABB RobotStudio 6.07.01 SP1 program. 
Due to unfortunate external requirements I must build it for the 64bit version of the RobotStudio.exe and cannot use 32bits.

I believe I have stumbled on a blocking bug in the C# API that affects the 64 bit version and not the 32bit version of RobotStudio. 

What I'm trying to do

I'm trying to obtain a reference to the IRC5 virtual controller for the default ABB robots (e.g. IRB_120_3kg_0.58m) so that I can read and subscribe to its IOSignals. 

The exception I get

Could not load file or assembly 'ABB.Robotics.Adapters.IRC5, Version=5.15.2005.2, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b' or one of its dependencies. The system cannot find the file specified. 

The cause 

The cause seems to be that the assembly in question is only available in the GAC_32 location and not GAC_64 or GAC_MSIL. 
This causes an exception while loading the controller in question.

When I try this exact same code in the 32bit version of RobotStudio I have no issues and I can read and subscribe to signals just fine.
I've verified that the same bug exists in v6.07 as well as v6.07+ 

Repro 

Code to reproduce the issue: 
var scanner = new NetworkScanner();
var cInfos = scanner.GetControllers(NetworkScannerSearchCriterias.Virtual); 
var first = cInfos.FirstOrDefault(); 
foreach (ControllerInfo c in cInfos) { 
    Debug.Print("{0} : {1} : {2}", c.ControllerName, c.Id, c.SystemId); 
} 

Also reproducible using the example code from the ABB developer docs: 
Station station = Project.ActiveProject as Station;
var activeTask = station.ActiveTask; 
RsIrc5Controller rsIrc5Controller = (RsIrc5Controller) activeTask.Parent; 
var controller = new Controller(new Guid(rsIrc5Controller.SystemId)); 
Debug.Print("Found Controller: {0}", controller.Name); 
Anybody encountered this same issue or similar? 
Any known work-around for this for those of us that MUST use the 64 bit version of RobotStudio?
If this is a bug, any timeline on a fix?

BCT Technology AG, Im Lossenfeld 9, 77731 Willstätt, Germany, https://www.bct-technology.com
Vorstand/Officers: Klaus Erdrich, Jürgen Hillemann. Registergericht/Registry Court: Amtsgericht Freiburg, HRB 371105
Aufsichtsrat/Supervisory Board: Prof. Dr. h.c. Horst Weitzmann (Vorsitzender/Chairman), Katja Weber, Markus Menges 

Comments

  • Johannes WeimanJohannes Weiman ABB Sweden admin
    Hi,
    It looks like you are using a very old version of PCSDK. Try installing the latest version.

    Regards, Johannes
  • SverrirSverrir Germany
    edited September 2018
    Hi Johannes, 

    Edit (Incorrectly reported this solved before): 
    I just now downloaded and ran the PCSDK.6.07.7936.1011.zip installer (which is the latest) and having it did not solve my issue.
    The problem is still there when I build the system as 64bit.

    Exception thrown: 'System.IO.FileNotFoundException' in SVERRIR.dll
    Additional information: Could not load file or assembly 'ABB.Robotics.Adapters.IRC5, Version=5.15.2005.2, 
    Culture=neutral, PublicKeyToken=1da709b7d1f14b7b' or one of its dependencies. 
    The system cannot find the file specified.
    The only installer I've run on my machine is the installer for RobotStudio 6.07 and then the RobotStudio 6.07.01 SP1 (and just now the latest PCSDK). 
    There has never been anything else from ABB on this machine.

    Regards,
    Sverrir S.

    BCT Technology AG, Im Lossenfeld 9, 77731 Willstätt, Germany, https://www.bct-technology.com
    Vorstand/Officers: Klaus Erdrich, Jürgen Hillemann. Registergericht/Registry Court: Amtsgericht Freiburg, HRB 371105
    Aufsichtsrat/Supervisory Board: Prof. Dr. h.c. Horst Weitzmann (Vorsitzender/Chairman), Katja Weber, Markus Menges 

  • Johannes WeimanJohannes Weiman ABB Sweden admin
    edited September 2018
    Which assemblies are you referencing? Note that you should not reference ABB.Robotics.dll or ABB.Robotics.Controllers.dll (legacy PCSDK) but instead ABB.Robotics.Controllers.PC.dll (new PCSDK).

  • SverrirSverrir Germany
    Hi again,

    Yeah, I'm referencing the ABB.Robotics.Controllers.PC.dll and using classes from it.


    BCT Technology AG, Im Lossenfeld 9, 77731 Willstätt, Germany, https://www.bct-technology.com
    Vorstand/Officers: Klaus Erdrich, Jürgen Hillemann. Registergericht/Registry Court: Amtsgericht Freiburg, HRB 371105
    Aufsichtsrat/Supervisory Board: Prof. Dr. h.c. Horst Weitzmann (Vorsitzender/Chairman), Katja Weber, Markus Menges 

  • SverrirSverrir Germany
    edited September 2018
    @Johannes Weiman  Your comment sent me on the right path, I had a closer look at the references and there seems like there was indeed a conflict in the dll references.

    After removing the following references:
        <Reference Include="ABB.Robotics, Version=5.15.2005.0, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b, processorArchitecture=MSIL" />
        <Reference Include="ABB.Robotics.Controllers, Version=5.15.2005.0, Culture=neutral, PublicKeyToken=1da709b7d1f14b7b, processorArchitecture=MSIL" />
        <Reference Include="RobotStudio.UI.Controller">
    All is working again in 64bits *phew*

    Note, I had referenced both the new and the old PCSDK dlls in my project (yeah, that was stupid). But even though I was not using any references from the old dll in my code, just having it in my project seemed to cause issues. Also there was a conflict with the ControllerInfo class which got solved when I removed ABB.Robotics.dll as well.

    Thanks for taking the time to help, it is much appreciated :)

    -Sverrir

    BCT Technology AG, Im Lossenfeld 9, 77731 Willstätt, Germany, https://www.bct-technology.com
    Vorstand/Officers: Klaus Erdrich, Jürgen Hillemann. Registergericht/Registry Court: Amtsgericht Freiburg, HRB 371105
    Aufsichtsrat/Supervisory Board: Prof. Dr. h.c. Horst Weitzmann (Vorsitzender/Chairman), Katja Weber, Markus Menges 

Sign In or Register to comment.