RobotStudio event

How to read and write rapid variables from web app

Hi,

I'm working on a project that requires a web interface to read and write numeric RAPID variables. These will be used to command the robot to perform various functions and allow feedback of the status back to the web app.

I understand a couple of options to us are OPC or the REST API (we have a brand new robot with the current controller).

I am familiar with OPC, but not REST, but the web developers are familiar with REST.

Does anyone have any suggestions as to pros and cons?

The REST API mentions it needs mastership to write variables. I assume the robot can still be running?

We have multitasking, PC interface and RobotStudio App Connect options in the licence file.

Hopefully I've provided enough information.

Comments

  • Hello

    Pros and cons depends of the type of the application and on who the user are, it’s hard to give any good advice. There are a lot of discussions about native vs web applications. Cross platform apps, etc, etc.

    The biggest drawback with Robot Web Services is that it does not (yet) has all the functionality which the PC SDK has. And yes Robot Web Services is a bit more complicated to use than a native API.

    Pros: You don’t need to install any ABB robotics specific code when using the REST API. You can choose your programming language and REST API's are used a lot by web applications.

    Cons: You have to write code which is already done by the OPC/Robot Communication Runtime yourself, such as parsing the data into some native format, reconnect/re-establish connections/subscriptions, etc. Host discovery works out of the box for OPC. Bonjour is supported by RobotWare 6, but you have to write the client yourself. Cross-origin, connect to more than one controller from one web page.

    Master ship: Yes the robot can be running when you read and write to a rapid variable.

    I have attached a very simple demo on read/write/subscribe on a persistent rapid variable. Place it in HOME/docs, works for me in IE, Chrome, Firefox without any external javascript libraries.


  • Where can I find the attachment ? or am I being stupid?