RobotStudio event

RS API feature: Add online controller





Hi sanderb,

using the  class ControllerManager you can get a list of all controller referenced by RobotStudio at the moment. You can use the method IsStationController() to check if it is a Virtual Controller that is referenced  because it is associated with a robot in a station, or if it is a controller added by the user on the Online Tab.

Unfortunately it is not possible to add or remove controllers via the API.
If you can explain your use case we are happy to consider adding an Add-method, or maybe a Connect-method to the API.

One of the reasons we did not expose it from scratch is that a simple Add-method seems to be something simple and almost atomic, but in this case a connection to a real controller may be setup, a lot of subscriptions on controller events are done by RobotStudio. It may take some time and so on. And I guess it is an asynchronous operation under the hood, so if we returned directly from the Add-method you would not really know what state RobotStudio are in.

I would like to give some advice on how to work with the Controller class from whithin RobotStudio. When you are developing an Add-In to RobotStudio, and want to do stuff with a controller, you shall not need to login from your code, as RobotStudio has already logged in. That happens when the user adds a controller to the Online Tab.

The user is responsible for managing mastership using the buttons of the Online Tab, and your Add-In shall just adopt. If the user has not requested mastership, you shall disable buttons in your user interface that needs mastership.






 




Niklas Skoglund2012-04-01 23:07:57

Best Regards, Niklas Skoglund
ABB Robotics

Developer Center
RobotStudio Blog

Comments

  • Hi Niklas,

    Thanks for your reply.

    The goal of my plugin is simple. I'm working as we speak on a project containing almost 30 controllers. Each morning I spend a lot of time adding these controllers to my Robotstudio. They are not found automatically by Robotstudio so this means entering all IP addresses and after that, click a lot on the add controller button.

    The trend is our company making "bigger" machines more often, so for me this would be a nice feature to have, saving me a lot of work.

    Maybe, in a later stadium I might want a "Backup" function, so I can easily backup all stations connected at once, but that is not the goal for this question.
  • Hi again!

    I moved this thread to UpFeed, as an API feature request

    Thanks for the use case.
    It makes sense.

    Feature request: 
    Make it possible to connect to an online controller using the API.
    It shall also be possible to disconnect from a controller.

    ABB reference: WI6830.

    Niklas Skoglund2012-04-02 14:37:57

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • Hello,
     

    may be it would be an easier solution to make the online "controller list" capable to reconnect to controllers in another subnet. Then you only need to import the list once in the morning. But this list only works with controllers that can be found by the scanner automatically ?!!

     

     
    regards
    Christian