Getting Started Sparkplug B Edge of Network Node

OAS is can act as a Sparkplug B Edge of Network Node and Host Application.

The following guide are the steps to define OAS as a Sparkplug B EoN Node to enable OAS Tags as Metric values to Sparkplug B clients acting as a Host Application for Edge Node and Device control and client applications to send and receive tag values of any OAS Data Source.

You can view the Getting Started with Sparkplug B Video to familiarize yourself with the following steps to setup Sparkplug B communications.

  • 00:00 – Introduction
  • 01:10 – Download OAS
  • 01:46 – Quick Start
  • 02:08 – Edge of Network Node
  • 05:52 – EoN Tags
  • 07:04 – Host Application
  • 09:20 – SpB Client Tags
  • 10:22 – Programatic Interface
  • 10:59 – CSV Export / Import
  • 12:27 – Multiple Metric Tags
  • 13:46 – Modbus
  • 16:10 – DCMD Metric Write
  • 17:00 – Data Route
  • 17:58 – Networking
  • 18:17 – Save Configuration
  • 18:56 – OAS Platform

If you would like OAS to act as a Host Application to control and send and receive data from other Edge of Network Node Devices see the Getting Started Sparkplug B Host Application guide.

Configure a Sparkplug B Driver

Step 1

OASStart Configure OAS application from the program group Open Automation Software.

Step 2

Select Configure-License and verify that MQTT is one of the available Drivers in the lower left of the form.  If you do not see the MQTT driver available contact support@oasiot.com to update your license.

Enabled Drivers

Note: You will need to be running Open Automation Software Version 19.0.0.54 or greater to support Sparkplug B communications.  Use Configure-Options-System Status to check the version of the running OAS Engine.  You can download the latest version at www.openautomationsoftware.com/downloads/open-automation-software/ or use the Update Version button under Configure-License to update to the latest version of OAS.

Step 3

Select Configure-Drivers.

Configure Drivers

Select localhost or the remote service you wish to modify with the Select button to the right of the Network Node list.

Network Node

Note: Optionally select the Live Data Cloud node if you are hosting data over the Internet with a standard Internet connection.

Step 4

Define the properties for the desired Sparkplug B Edge Node.

Enter a meaningful Driver Interface Name.

Set the Driver property to Sparkplug B.

Enter the Host property to the IP Address of the of the host broker or just use localhost for a local broker. 

Set the Port property of the host broker to connect to.  The default port is 1883 or 8883 for SSL.

Note: The OAS MQTT Broker can be used to host data locally.  To use another broker on the default ports on the same computer change the OAS MQTT Broker Port under Configure-Options-MQTT Broker.

Enter the User Name and Password if required.

Keep Alive Time – Default is 60 Seconds.

Reconnect Time – Default 1 Second. If the connection to the broker is lost the Reconnect Time determines how long to wait before attempting to reconnect.

To connect with Transport Layer Security enable the property SSL / TLS.

Specify the Private Key File and Certificate File to use.

Uncheck the property Create Certificate to specify a PFX Certificate File and PFX Certificate Password.

Set the MQTT Protocol Version to V311 or V500.

 

Set the Client ID to a unique value, each driver interface must have a specific value different than all other clients connecting to the host.

Optionally define a secondary failover Host Broker if the primary Host Broker fails with the property Enable Failover.

If both the primary and secondary broker are offline the Return to Online settings determines the retry frequency.

View Driver Interface Failover for more information and and video demonstrating communications failover.

Set the Mode to Edge Node.

Set the Hode Mode to Remote Hosted if a Host Application to control the state of this Edge Node including another OAS driver set as Host App.  Set to Self Hosted to have this OAS driver control the state of the Edge Node.

Set the Host ID to the specific value that the Edge of Nodes will be using as the Host Application ID.

Set the Sparkplug B Version to 2.2 or 3.0.

Set the Group ID and Edge Node ID that defines this EoN Node.

Note: This Group ID and Edge Node ID values will be used to define which OAS tags will be enabled for hosting values in the next step to Define OAS Tags as EoN Node using the Host Group ID and Host Edge Node ID tag properties.

Optionally set the Device ID Filter to include only a specific device defined by the Tag property Host Device ID.  Leave blank to include all tags with all Host Device IDs defined with same Group ID and Edge Node ID.

Step 5

Select the Add Driver button in the left part of the form to add the Driver Interface as an available selection when defining Tags in the next step.

Add Driver

Note: If you need to define several Driver Interfaces you can use the CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel.  You can also programmatically define drivers using the .NET OASConfig assembly or OAS REST API.

 

Defining OAS Tags as Sparkplug B EoN Node and Device Metrics

Step 1

Select Configure-Tags.

Configure Tags

Select localhost or the remote service you wish to modify with the Select button to the right of the Network Node list.

Network Node

Note: Optionally select the Live Data Cloud node if you are hosting Allen Bradley data over the Internet with a standard Internet connection.

Step 2

Select to Add a Tag to create a new tag or select any existing Tag.

Note: You can also add organizational Groups as many levels deep as you prefer and add tags to groups.  To do this first add a Group to Tags Group at the root level, then right click on the Group in the right window to add additional Groups or Tags.

Add Group

Step 3

The Data Source can be any OAS Data Source including Allen Bradley PLCs, Siemens controllers, Modbus devices or masters, OPC UA servers and clients, OPC DA servers and clients, MQTT brokers and clients, MTConnect, Calculations, Simulation, or other Sparkplug B Node Metrics.

Step 4

Specify the Host Group ID and Host Edge Node ID to match the Group ID and Edge Node ID defined in the Edge Node Driver Interface.

Set the Host Device ID and Host Metric Name to any value you desire.  Optionally leave the Host Device ID blank if you want the Metric to appear directly in the Edge Node.  Each OAS tag must have a unique combination of Host Group ID, Edge Node ID, Device ID, and Metric Name.  Two or more tags cannot share the same combination.

Step 5

Select Apply Changes and the OAS tag value will be published to the specified Host anytime the tag value changes.  The value can also be updated with a NCMD or DCMD command to the specific Metric Name.  If the OAS Tag is defined to another Data Source the value will be written to that source.

Step 6

To define multiple tags use the CSV Export and CSV Import on the toolbar in the upper right together with Microsoft Excel.

Note: You can also programmatically define Tags using the free to use .NET OASConfig assembly or OAS REST API.

Step 7

Select the Save button on the toolbar at the top.

Save Button