RobotStudio event

PCSDK - Getting Started and how to set Motors On


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

John Wiberg2012-09-26 13:28:00

Comments

  • 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

  • Hi Gary,

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


    I haven't tried it myself but you should be able to do MotorsOn through the Controller.State method, in sending it a ControllerState 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 which has much more "power" over things.

     

    Please let me know how that works out for you.




  • Thanks John, works a treat!


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