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

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 doI’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 getCould 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 causeThe 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+

ReproCode 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?

Hi,
It looks like you are using a very old version of PCSDK. Try installing the latest version.

Regards, Johannes

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.

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).

Hi again,

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

@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 :slight_smile:

-Sverrir

I can confirm that the solution above also works on sample code “Accessing Controller Data”:

  • remove obsolete ABB .dll’s references
  • add new reference: (current year example: …\ABB\SDK\PCSDK 2021\ABB.Robotics.Controllers.PC.dll)
  • change build target .NET framework to latest on each project that uses new .dll’s