# Conection between C# interface and Controller

**URL:** <https://tech-community.robotics.abb.com/t/conection-between-c-interface-and-controller/9830>\
**Category:** Developer Tools\
**Tags:** control-abb-robot-with-c, visual-studio, c, pc-interface\
**Created:** [November 30, 2020, 11:53am UTC](https://tech-community.robotics.abb.com/t/conection-between-c-interface-and-controller/9830 "2020-11-30T11:53:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor14](https://avatars.discourse-cdn.com/v4/letter/v/f04885/32.png) [@victor14](https://tech-community.robotics.abb.com/u/victor14)\
**Post date:** [November 30, 2020, 11:53am UTC](https://tech-community.robotics.abb.com/t/conection-between-c-interface-and-controller/9830/1 "2020-11-30T11:53:52Z")

</div>

I am trying to establish a connection between an interface that I made in Visual Studio, Windows Forms, in C# and my controller, I cannot solve this trouble, I have tried 2 differents ways of doing it:

First with tutorials of PC SDK and still does not work, I cannot get the network scanner to scan my controller´s IP addres.

On the other hand I have found on the internet a C# library developed by a person, the library is called Machina, and it also has many examples, but when I introduce the code in my program, it turns out an exception, and I dont know how to manage it.

 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/f/f4d5cd9d08b51b4deb064cd574195c1a6e00e42e.jpeg)  
If anyone knows how to solve this exception please tell me, because I am going bananas.  
Thanks

---

<div class="post-metadata">

**Author:** ![Maxim](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/maxim/32/4429_2.png) [@Maxim](https://tech-community.robotics.abb.com/u/Maxim)\
**Post date:** [November 30, 2020, 12:01pm UTC](https://tech-community.robotics.abb.com/t/conection-between-c-interface-and-controller/9830/2 "2020-11-30T12:01:50Z")

</div>

Hello there,

Have you looked at this post: [ABB Robotics Community - Maintenance](https://forums.robotstudio.com/discussion/12056/pc-sdk-examples)

If yes, can you please be more specific regarding any issues you encounter when trying to get NetScanner to find your controller.

Thanks.

---

<div class="post-metadata">

**Author:** ![victor14](https://avatars.discourse-cdn.com/v4/letter/v/f04885/32.png) [@victor14](https://tech-community.robotics.abb.com/u/victor14)\
**Post date:** [November 30, 2020, 12:25pm UTC](https://tech-community.robotics.abb.com/t/conection-between-c-interface-and-controller/9830/3 "2020-11-30T12:25:16Z")

</div>

Hi have checked your post, and downloading your source code, I am going to transform it into mine, soi it will work, but I have a question, will it work the same in a different project, because your project is not with windows forms.

---

<div class="post-metadata">

**Author:** ![Maxim](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/maxim/32/4429_2.png) [@Maxim](https://tech-community.robotics.abb.com/u/Maxim)\
**Post date:** [December 1, 2020, 11:35am UTC](https://tech-community.robotics.abb.com/t/conection-between-c-interface-and-controller/9830/4 "2020-12-01T11:35:21Z")

</div>

Hello Victor,

The code for creating the controller object should be the same regardless if you’re using WPF or WinForms project.
