# PCSDK - Getting Started and how to set Motors On

**URL:** <https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074>\
**Category:** Developer Tools\
**Created:** [September 9, 2012, 10:46pm UTC](https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074 "2012-09-09T22:46:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GaryRice](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@GaryRice](https://tech-community.robotics.abb.com/u/GaryRice)\
**Post date:** [September 9, 2012, 10:46pm UTC](https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074/1 "2012-09-09T22:46:44Z")

</div>

Hello,  
I am just starting to experiment with SDK (so very new to it and this may be a very easy question) and I am trying to follow the creating a simple project in the PC SDK manual.  
I built the network scanner in C# 2010 Express and it worked fine now I am trying to do the same thing in Visual Basic 2010 Express and I keep getting an error:

The type initializer for ‘ABB.Robotics.Controllers.Internal.NetworkScanner’ threw an exception.

when trying to build the project!

Can anybody give any advice?

Also when i get past this does anybody know how to code robot motors on in VB and C#?

Thanks in advance!  
Gary Rice

---

<div class="post-metadata">

**Author:** ![GaryRice](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@GaryRice](https://tech-community.robotics.abb.com/u/GaryRice)\
**Post date:** [September 10, 2012, 10:06am UTC](https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074/2 "2012-09-10T10:06:01Z")

</div>

Hi,  
Ok so it would appear that i was using the wrong .net framework…

But if anybody has code for robot motors on! that would be appreciated?

Thanks  
Gary

---

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [September 10, 2012, 12:56pm UTC](https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074/3 "2012-09-10T12:56:23Z")

</div>

Hi Gary,

Welcome and hope that you will enjoy working with the SDKs. :sunglasses:

I haven’t tried it myself but you should be able to do MotorsOn through the [Controller.State](http://developercenter.robotstudio.com:80/Index.aspx?DevCenter=RobotCommunication&OpenDocument&Url=html/a6d8b7e5-b007-fc52-763c-da0958f72e86.htm) method, in sending it a [ControllerState](http://developercenter.robotstudio.com:80/Index.aspx?DevCenter=RobotCommunication&OpenDocument&Url=html/ce30e79a-5902-fb38-75c1-f6840c308ee1.htm) of MotorsOn. However as you can see in the text that only works if you are already in automatic mode. So its a bit limited.

That implementation is there due to safety concerns. If you have the safety issues under control you could combine PCSDK commmands and System Signals to greater effect.

If you are working with virtual controllers you can set it with the [VirtualPanel.BeginChangeState](http://developercenter.robotstudio.com:80/Index.aspx?DevCenter=RobotCommunication&OpenDocument&Url=html/8cb57b24-fa0b-bcd5-4921-c16a8b7b1000.htm) which has much more “power” over things.

Please let me know how that works out for you.

---

<div class="post-metadata">

**Author:** ![GaryRice](https://avatars.discourse-cdn.com/v4/letter/g/bc8723/32.png) [@GaryRice](https://tech-community.robotics.abb.com/u/GaryRice)\
**Post date:** [September 26, 2012, 1:22pm UTC](https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074/4 "2012-09-26T13:22:55Z")

</div>

Thanks John, works a treat!

---

<div class="post-metadata">

**Author:** ![John\_Wiberg](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/john_wiberg/32/1485_2.png) [@John\_Wiberg](https://tech-community.robotics.abb.com/u/John_Wiberg)\
**Post date:** [September 26, 2012, 1:27pm UTC](https://tech-community.robotics.abb.com/t/pcsdk-getting-started-and-how-to-set-motors-on/5074/5 "2012-09-26T13:27:07Z")

</div>

:sunglasses:

I have taken the liberty to edit the topic header to better reflect the content.  
Good luck & have fun.
