Skip to content

Abb robot subscription

Subscribe to robot's resource and emit message on resource change.

Inputs

Field Type Description
payload object the object with subscription definition.

Outputs

Field Type Description
topic string Description of content type.

Details

msg.payload includes subscription definition:

  • msg.payload.subscribe (boolean) when it's not equal true subscription will be done for resource setup from node configuration.
  • msg.payload.resource (string) path to subscribed resource.
  • msg.payload.priority (number) integer from range 0 to 2. Defines respectively LOW, MEDIUM and HIGH priorities. In general priority define delay between change and sending event.

ℹ️ NOTE: HIGH priority is applicable only for persistent RAPID variables and IO Signals.

Example subscription message for /rw/panel/speedratio resource with priority MEDIUM:

{
    "payload": {
        "subscribe": true,
        "resource": "/rw/panel/speedratio",
        "priority": 1
    }
}

When output message is response on subscription message then msg.topic is equal ABB_SUBSCRIPTION_SUCCESS, ie.:

{
    "topic": "ABB_SUBSCRIPTION_SUCCESS",
    "payload": {
        "subscribe": true,
        "resource": "/rw/panel/speedratio",
        "priority": 1
    }
}

In case of subscription fail, error message is emitted with msg.topic set to ABB_SUBSCRIPTION_ERROR.

Resource change emits message with msg.topic set to ABB_ROBOT_SUBSCRIPTION_VALUE and resourcePath to path the resource, ie.:

{
    "topic": "ABB_ROBOT_SUBSCRIPTION_VALUE",
    "payload": "<?xml version=\"1.0\" encoding=\"utf-8\"?><html xmlns=\"http://www.w3.org/1999/xhtml\"> <head> <title>Event</title><base href=\"http://192.168.122.38:80/\"/> </head> <body>  <div class=\"state\"><a href=\"subscription/31\" rel=\"group\"></a> <ul> <li class=\"pnl-speedratio-ev\" title=\"speedratio\"><a href=\"/rw/panel/speedratio\" rel=\"self\"></a><span class=\"speedratio\">3</span></li>  </ul> </div> </body></html>",
    "resourcePath": "/rw/panel/speedratio"
}

Configuration

Property Description
Name Name of the node instance
Priority Resource update sending priority
Config A config node with robot connection parameters
Config ID ID of config node
Resource List of resources and resource categories for subscription
Resource URL Read only field with resource path

References