about a exception "System.TypeInitializationException" when using PC SDK
I have referenced this two .dll files (ABB.Robotics.dll and ABB.Robotics.Controllers.dll). I created a button and added a click event. In the click event function, I write one line code " NetworkScanner ns = new NetworkScanner();" Also I have added the using instruction
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.Discovery;
using ABB.Robotics.Controllers.RapidDomain;
But when I run this instruction, the exception has came out
An unhandled exception of type 'System.TypeInitializationException' occurred in ABB.Robotics.Controllers.dll
Additional information: The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception.
Thank you very much.
Best Answer
-
Hi Tyler,
Searching this forum with that error gives this topic, where you will find a solution to your issue:
http://forums.robotstudio.com/discussion/7127/pc-sdk-compability-issues
You are using an older version of PC SDK which wasn't compatible with 64-OS. Which meant you had to edit the app config file.
My recommendation would be to download and use the latest version of PCSDK instead, that way you can avoid this whole issue.
http://developercenter.robotstudio.com/downloads
You would only need to replace the references and the using part since the new version is one dll only that is it. (Click the related "Release Notes" link for the download for more info).
=John
John
Developer Center5
Answers
-
Tyler said:
I have referenced this two .dll files (ABB.Robotics.dll and ABB.Robotics.Controllers.dll). I created a button and added a click event. In the click event function, I write one line code " NetworkScanner ns = new NetworkScanner();" Also I have added the using instruction
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.Discovery;
using ABB.Robotics.Controllers.RapidDomain;But when I run this instruction, the exception has came out
An unhandled exception of type 'System.TypeInitializationException' occurred in ABB.Robotics.Controllers.dll
Additional information: The type initializer for 'ABB.Robotics.Controllers.Internal.NetworkScanner' threw an exception.
Thank you very much.
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)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings