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

Getting Started Sparkplug B Host Application

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

If you would like OAS to act as an Edge of Network Node view the Getting Started Sparkplug B EoN Node setup guide.

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

The following guide are the steps to define OAS as a Sparkplug B Host Application to receive and update Edge Node Metric values.  The interface can control the online state of each Edge of Node or just act as a client.

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.53 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 host.

Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with Sparkplug B source.

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 Host App for OAS to control the online state of each Edge of Node defined to the shared Host Application ID.

Note: To enable a communication interface to Edge of Nodes, but not set the state of the Host ID set the mode to Client App.

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.

To automatically add tags for each Metric from the matching Group, Edge of Nodes, and Devices enable the property Add Client Tags Automatically.

When enabled optionally set the Filter Groups, Edge Nodes, and Devices that tags should be added from for each of their Metrics.  Leave the Filter fields blank to include all Edge of Nodes publishing data to the broker.

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 Metric Data from Edge Nodes

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

Note: If the Driver Interface property Add Client Tags Automatically was enabled tags will be created for you, you can skip this step to add tags manually.

Select to Add a 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

Change the Data Source Tag property to Sparkplug B.

Step 4

Select the correct Driver Interface from the Driver Interface pull down list.

Step 5

Specify the Client Group ID, Client Edge Node ID, Client Device ID, and Client Metric Name for the Edge of Node Metric value to read and write.

Step 6

Select the Data Type of the Tag to match the data type of the Metric.

Step 7

Select Apply Changes and the current value for the Metric should appear with Good Quality.

Note: The above tag was automatically created using the Sparkplug B Test Compliance Kit as an Edge of Node source.

Step 8

To setup automated data transfer of any OAS Tag to and from the Sparkplug B Tags see Getting-Started – Data Route.

Step 9

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 10

Select the Save button on the toolbar at the top.

Save Button

Getting Started Azure Event Hubs

View the following video on how to setup publishing data to Azure Event Hubs.

  • 00:00 – Introduction
  • 00:45 – Getting Started Guide
  • 01:10 – Create Event Hub
  • 01:44 – Azure Portal
  • 02:25 – Setup Driver
  • 04:00 – Publish Select Tags
  • 07:15 – Save Configuration
  • 08:00 – Monitor Data
  • 10:20 – IoT Publish

Create an Event Hub

You need to create an Event Hub for your device to connect to. The following steps show you how to complete this task using the Azure portal:

Step 1

Sign in to the Azure portal.

Step 2

From the left menu, click Create a resource, then click Analytics, and then click Event Hubs.

Create Azure Event Hub

Step 3

On the Basic tab of the Create Namespace step that appears enter your Project Details.

Create Azure Namespace

  • Select the Azure Subscription to use for the Event Hub.
  • Select existing or create a a new Resource group.
  • Enter a Namespace name.
  • Select Location.
  • Select a Pricing tier.
  • Set the Throughput Units.

Select Review + create

Azure Namespace Validation

Then the Create button after the Validation succeeded.

You will see Deployment is in progress for a minute, then when finished you will see Your deployment is complete and the resource will be ready for use.

Azure Event Hub Deployment

Select Go to resource.

Step 4

Add Azure Event Hub

In Event Hubs Namespace select + Event Hub to add an Event Hub to publish data to.

Azure Event Hub Settings

Set the Event Hub Name and select Review + create.

Azure Event Hub Validation

Select Create when the prompt of Validation succeeded appears.

The Event Hub is now ready for use with OAS to publish data to.

Step 5

Next click Shared access policies from the left menu.  In the pane that appears to the right, click RootManageSharedAccessKey or use + Add to create a new key.

Azure Shared Access Policies

In the panel that appears to the right, select the Copy to clipboard icon next to Connection string – primary key.  Save this as well, you will need it later.

You have now created your Event Hub the connection string you need to complete the rest of this tutorial.

Create an Azure IoT Driver

Step 1

Open Configure OAS application.

Step 2

Select Configure – Drivers from the top menu.

Configure Drivers

Step 3

Select your Network Node, either localhost or remote.

Step 4

Enter the Driver Interface Name you wish to use.

Select Azure IoT from the Driver combo box.

OAS Azure Type Event Hubs

Select Event Hubs from the Type combo box.

OAS Azure Event Hub Settings

Copy the Connection string – primary key previously save from the Azure portal and past in the Azure IoT Connection property.  This typically begins with Endpoint=sb://.

Set the Azure IoT Hub property to the Event Hub Name previously defined.

Step 5

To enable data buffering when communication failure occurs check Enable Store and Forward. Values will be stored in the directory specified under Configure >> Options >> Store and Forward.

Step 6

Optionally define a secondary failover Connection and Hub if the primary server fails with the property Enable Failover.

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

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

Step 7

Click Add Driver on the top left.

Add Driver

Publish Live Data to your Azure IoT Hub.

There are 2 ways to publish data from OAS to Azure IoT Hub.  Both require Tags to be setup first for the data sources you want to transfer.

Option 1 – Publish Selected Tags to your Azure Event Hub.

View the following video for a complete demonstration of how to publish data to Azure IoT Data Hub.

  • 00:00 – Introduction
  • 00:23 – Set up Tags in OAS
  • 00:41 – Configure Azure IoT
  • 01:53 – Publish Selected Tags
  • 05:31 – Visual Studio Code
  • 08:00 – Step by step instructions
  • 08:12 – Bulk Publish to AWS IOT
  • 09:21 – Step by step instructions / Publish Data to AWS IOT Gateway
  • 09:33 – Bulk Publish to mqtt broker
  • 10:29 – MQTT Explorer
  • 11:20 – Step by step instructions/ Getting Started MQTT
  • 11:34 – Save button of the OAS Configuration tool

Step 1

Enable Publish Selected Tags at the bottom of the Driver configuration.

Step 2

Select to publish data continuously at a specified interval, based on event, or at a specific time of day.

IoT Publish Type

If Event Driven browse for a local or remote OAS tag that will trigger the publish.  Select a Boolean tag that will change state from false to true, true to false, or both.  Or choose an Integer tag that trigger a publish anytime the value changes other than 0.

IoT Publish by Event

Step 3

Enable Publish Latest Value Only to send only the latest value of each tag when published or disable to send all value changes since the last time a publish occurred.

Enabled Include All Tags Each Publish to send at least the latest value of each tag when published or disable to only send the tags that have changed since the last publish.

Enable Publish All Tags As One Topic to publish all tag values as one topic or disable to send each tag as its own topic.

IoT Publish Options

See examples in Step 6 below for each selectable option.

Step 4

Specify the Publish Topic Id if choosing to Publish All Tags As One Topic.

Specify the Tag Id, Value Id, an optional Quality Id, and Timestamp Id for each tag value that is sent.

IoT Publish Ids

When including the Timestamp Id also specify the timestamp format, use Custom to specify your own date and time format.

Step 5

Specify local and remote OAS tag variables to include in each publish and specify the Id.  Value is the current value from the data source or you can select any of the over 600 tag variables of each tag to publish.

IoT Publish Tags

Optionally use CSV Export and CSV Import buttons to set up additional tags to publish using Microsoft Excel.

When selecting remote tags use Basic Networking syntax or Live Data Cloud syntax in the tag path.

Step 6

Select Apply Changes to begin publishing to Azure Event Hub.  Select Save to save the new driver configuration within the tag file.

Examples:

Examples of publishing every 2 seconds with each tag value changing every second:

IoT Publish Options

{

  “deviceId”: “OASIOT”,
  “topic”: “oas_tags”,
  “values”: [
    {
      “id”: “Ramp”,
      “value”: 39,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.8090169943749475,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    },
    {
      “id”: “Random”,
      “value”: 10,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    }
  ]
}
 
IoT Publish All Value Chagnes

{

  “deviceId”: “OASIOT”,
  “topic”: “oas_tags”,
  “values”: [
    {
      “id”: “Ramp”,
      “value”: 16,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.587785252292473,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Random”,
      “value”: 96,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Ramp”,
      “value”: 17,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.6691306063588583,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    },
    {
      “id”: “Random”,
      “value”: 26,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    }
  ]
}
 
IoT Publish Tag Id Topics

{

  “deviceId”: “OASIOT”,
  “id”: “Ramp”,
  “value”: 35,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
{
  “deviceId”: “OASIOT”,
  “id”: “Sine”,
  “value”: -1,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
{
  “deviceId”: “OASIOT”,
  “id”: “Random”,
  “value”: 83,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
 

Option 2 – Use Data Route to Send Data to Azure Event Hub

Step 1

Select Configure >> Tags from the top menu.

Step 2

Select your Network Node, either local or remote.

Step 2

From the demo tags select the Ramp Tag.

Step 3

Select the Target tab.

Step 4

Enable Write to target.

Step 5

Select the Azure IoT in the Target Type dropdown.

Step 6

Select the Driver interface you created.

Step 7

Apply the Changes and you should now be writing to your Event Hub.

Step 8

The message is formatted as follows.

{“deviceId”:”myFirstDevice”,”TagName”:”Ramp”,”Value”:66,”DataType”:”DoubleFloat”,”Quality”:true,”TimeStamp”:”2016-04-11T14:38:53.7125255″}

Use Visual Studio Code to Monitor Events.

Visual Studio Code can be used to monitor the events published to Azure Event Hubs.

Sign in to your Azure account and connect Visual Studio to your Azure account.

Visual Studio Code Azure Event Hubs Monitor

Select View-Command-Palette to select EventHub: Select Event Hub.

When prompted select your subscription, namespace, and Event Hub.

Select View-Command-Palette to select EventHub: Start Monitoring Event Hub Message.

Azure Event Hub Data

 

 

Restrict Tag Access

Access to tag data and the ability to see what tags are available can be restricted by user authentication or prevent unauthorized access.  The Security features can be used to designate tag groups or individual tags per organization, customer, or designation on how you determine to allocate users in OAS.

Before proceeding first follow the steps in the Getting Started – Security guide to create an Admin user.

When adding tags to OAS organizing the tags in groups by area or organization will make the security restriction easy to designate tags that start with a character string.

In the following steps we will use the example tag configuration demonstrate access to tags organized by company and customer.

Company-Customer-Tags

To restrict access to read, write, and browse tags use the Security group tab Tags, Read Tags, and Write Tags of the Default security group and allow access to the designated security group defined to each user.

Read Tags

Use Configure-Security to list all currently defined Security Groups.

Configure Security

Select the Default security group and uncheck Enable All Features.

Uncheck Enable All Features

Under the Read Tags tab check Disable All Tags From Reading.

Disable Read Tags

Note: This will prevent all applications including remote OAS Engines to receive live values from this OAS Engine.

You can optionally enable specific tags or tags start with a matching string for read access without authentication required.

Enable Read Tags

Select Apply Changes to update the Default security group.

Apply Changes

Next create security groups for customers, companies, administrators full access privileges.

The first example create a security group for Customer 1 of Company 1.

Change the Group Name property of the security group, the group name can be anything you like, we will use Company 1-Customer 1 in this example.

In the Read Tags tab leave Disable All Tags From Reading unchecked.

Select ADD in the list to Enable Reading Tags that Start With to browse for a tag within the Company 1.Customer 1 group and remove the tag portion of the string and select OK.

Browse Company Customer

This security group will allow read access to tags that start with Company 1.Customer 1.

Allow Read Tags Company and Customer

Note: If you wanted to provide company wide access to all customers set the string that starts with to Company 1.  If you want to provide read access to all tags in the configuration uncheck Disable All Tags From Reading.

You can also designate tags by complete name with the list Tags To Enable Reading.  This is a way to include specific tags within a tag group, but not all tags in the group.

Select Add Group.

Add Group

From the top menu select Configure-Users to define one or more users to the Company 1-Customer 1 group.

Configure Users

Enter a User Name and Password for the user that will have access to read tag from Company 1.Customer 1 tag group.

Use the Security Group pull down to select the security group you have defined for the Company 1.Customer 1 group.

Company Customer User

Select Add User.

Add User

Select Save to save a security configuration file.

Save

When prompted select to set as the default security configuration file.

Default Security File

Repeat the above steps for each customer in each company.

Note: To define multiple security groups and users you can use CSV Export / Import, .NET Server Configuration, or REST API.

CSV Import and Export

Write Tags

To restrict write access to tags per user use the same steps above as listed for Read Tags and use the Write Tags tab of the security groups.

In the Default security group check Disable All Tags From Writing.

Disable Write Tags

In each additional security group select ADD in the list to Enable Writing Tags that Start With to browse for a tag within the Company 1.Customer 1 group and remove the tag portion of the string and select OK.

This security group will allow write access to tags that start with Company 1.Customer 1.

Enable Write Tags

Note: If you wanted to provide company wide access to all customers set the string that starts with to Company 1.  If you want to provide write access to all tags in the configuration uncheck Disable All Tags From Writing.

You can also designate tags by complete name with the list Tags To Enable Writing.  This is a way to include specific tags within a tag group, but not all tags in the group.

Select Save to save a security configuration file.

Save

Browse Tags

To restrict browse access to tags use the same steps above as listed for Read Tags and use the property Disable All Tags from Browsing in the Tags tab of the security groups.

Check Disable All Tags From Browsing in the Default security group in the Tags tab and select Apply Changes.

Disable Browsing

Select Apply Changes to update the Default security group.

Apply Changes

In each additional security group select ADD in the list to Enable Browsing Tags that Start With to browse for a tag within the Company 1.Customer 1 group and remove the tag portion of the string and select OK.

This security group will allow browse access to tags that start with Company 1.Customer 1.

Enable Browse

Note: If you wanted to provide company wide access to all customers set the string that starts with to Company 1.  If you want to provide browse access to all tags in the configuration uncheck Disable All Tags From Browsing.

Select Save to save a security configuration file.

Save

View how to Implement User Credentials in Client Applications to provide log in method for each user.

 

Publish Data to AWS IoT Gateway

View the following video for a complete demonstration of how to publish data to AWS IoT Gateway, Azure IoT, and MQTT Brokers.

  • 00:00 – Introduction
  • 00:23 – Set up Tags in OAS
  • 00:41 – Configure Azure IoT
  • 01:53 – Publish Selected Tags
  • 05:31 – Visual Studio Code
  • 08:00 – Step by step instructions
  • 08:12 – Bulk Publish to AWS IOT
  • 09:21 – Step by step instructions / Publish Data to AWS IOT Gateway
  • 09:33 – Bulk Publish to mqtt broker
  • 10:29 – MQTT Explorer
  • 11:20 – Step by step instructions/ Getting Started MQTT
  • 11:34 – Save button of the OAS Configuration tool

Create an IoT Driver

Step 1

Open Configure OAS.

Step 2

Select Configure >> Drivers from the top menu.

Step 3

Select your Network Node, either local or remote.

Step 4

Enter the Driver Interface Name you wish to use.

Step 5

Select AWS IoT Gateway from the Driver combo box.

Use the Browse buttons to select you Certificate File Path and the Private Key File Path. These are created in your AWS Management Console.

Enter the IoT End Point. This is also found in your AWS Management Console.

AWS IoT Driver Configuration

If you would like to define a secondary AWS end point if the primary server fails, check Enable Failover checkbox and enter it’s physical properties. If both the primary and secondary servers are offline the Return to Online settings determines the retry frequency.

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

Note: Data that is to be published to the AWS IoT Gateway can be buffered during network failures by setting the Enable Store and Forward property to true. Define the path for the buffer files under Configure-Options-Store and Forward.

Step 6

Click Add Driver on the top left.

Publish Live Data to AWS IoT Gateway.

There are 2 ways to publish data from OAS to AWS IoT Gateway.  Both require Tags to be setup first for the data sources you want to transfer.

Note: If you wish to receive data from AWS IoT Gateway see Getting Started – AWS IoT Gateway under the Data Sources.

Option 1 – Publish Selected Tags to AWS IoT Gateway.

Step 1

Enable Publish Selected Tags at the bottom of the Driver configuration.

Step 2

Select to publish data continuously at a specified interval, based on event, or at a specific time of day.

IoT Publish Type

If Event Driven browse for a local or remote OAS tag that will trigger the publish.  Select a Boolean tag that will change state from false to true, true to false, or both.  Or choose an Integer tag that trigger a publish anytime the value changes other than 0.

IoT Publish by Event

Step 3

Enable Publish Latest Value Only to send only the latest value of each tag when published or disable to send all value changes since the last time a publish occurred.

Enabled Include All Tags Each Publish to send at least the latest value of each tag when published or disable to only send the tags that have changed since the last publish.

Enable Publish All Tags As One Topic to publish all tag values as one topic or disable to send each tag as its own topic.

IoT Publish Options

See examples in Step 6 below for each selectable option.

Step 4

Specify the Publish Topic Id if choosing to Publish All Tags As One Topic.

Specify the Tag Id, Value Id, an optional Quality Id, and Timestamp Id for each tag value that is sent.

IoT Publish Ids

When including the Timestamp Id also specify the timestamp format, use Custom to specify your own date and time format.

Step 5

Specify local and remote OAS tag variables to include in each publish and specify the Id.  Value is the current value from the data source or you can select any of the over 600 tag variables of each tag to publish.

IoT Publish Tags

Optionally use CSV Export and CSV Import buttons to set up additional tags to publish using Microsoft Excel.

When selecting remote tags use Basic Networking syntax or Live Data Cloud syntax in the tag path.

Step 6

Select Apply Changes to begin publishing to AWS IoT Gateway.  Select Save to save the new driver configuration within the tag file.

Examples:

Examples of publishing every 2 seconds with each tag value changing every second:

IoT Publish Options

Topic: oas_tags
{
  “values”: [
    {
      “id”: “Ramp”,
      “value”: 39,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.8090169943749475,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    },
    {
      “id”: “Random”,
      “value”: 10,
      “quality”: true,
      “timestamp”: “2022-03-21T08:55:39.000Z”
    }
  ]
}
IoT Publish All Value Chagnes
Topic: oas_tags
{
  “values”: [
    {
      “id”: “Ramp”,
      “value”: 16,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.587785252292473,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Random”,
      “value”: 96,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:36.000Z”
    },
    {
      “id”: “Ramp”,
      “value”: 17,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    },
    {
      “id”: “Sine”,
      “value”: 0.6691306063588583,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    },
    {
      “id”: “Random”,
      “value”: 26,
      “quality”: true,
      “timestamp”: “2022-03-21T09:03:37.000Z”
    }
  ]
}
IoT Publish Tag Id Topics
Topic: Ramp
{
  “value”: 35,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
Topic: Sine
{
  “value”: -1,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}
Topic: Random
{
  “value”: 83,
  “quality”: true,
  “timestamp”: “2022-03-21T09:07:15.000Z”
}

Option 2 – Use Data Route to send data to AWS IoT Gatway.

Step 1

See Getting Started – Data Route to define a Target tag in any source tag.

Getting Started – AWS IoT Gateway

View the following video for a complete demonstration of how to publish data to AWS IoT Gateway, Azure IoT, and MQTT Brokers.

The following steps can be used to setup direct driver communications with AWS.

Step 1

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

 

Step 2

Select Configure-License from the top menu and verify that AWS IoT is listed under Enabled Products.  If not, contact support@oasiot.com to update your license.

Enabled Products

Note: You will need to be running Open Automation Software Version 10.0.0.22 or greater to support AWS communications.  You can download the latest version at www.openautomationsoftware.com/downloads/open-automation-software/

Step 3

Select Configure-Drivers.

Configure Drivers

Step 4

Select localhost or the remote service you wish to modify with the Select button to the right of the Network Node list.  Optionally select the Live Data Cloud node if you are hosting AWS data over the Internet with a standard Internet connection.

Step 5

Enter a meaningful Driver Interface Name that you use to to refer to this physical connection when defining Tags with an AWS Source.

Note: You may need to Set Default Network Adapter for Driver Interfaces of the operating system.

Set the Driver dropdown to AWS IoT Gateway. The default Broker Port is 8883.

Use the Browse buttons to select you Certificate File Path and the Private Key File Path. These are created in your AWS Management Console.

Enter the IoT End Point. This is also found in your AWS Management Console.

AWS IoT Driver Configuration

If you would like to define a secondary AWS end point if the primary server fails, check Enable Failover checkbox and enter it’s physical properties. If both the primary and secondary servers are offline the Return to Online settings determines the retry frequency.

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

Note: Data that is to be published to the AWS IoT Gateway can be buffered during network failures by setting the Enable Store and Forward property to true. Define the path for the buffer files under Configure-Options-Store and Forward.

Step 6

Select the Add button in the lower 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.

To publish data to AWS IoT Gateway see Getting Started – Publish Data to AWS IoT Gateway.

Follow the steps below to read data from AWS IoT Gateway.

Step 7

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.

Save

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

Step 8

Select to Add a 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 the 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 9

Set the appropriate Data Type.
Note: if you will be receiving data from your Thing set the Data Type to String otherwise set the Data Type to the desired data type.

Step 10

Change the Data Source Tag property to AWSIoTGateway.

AWS Data Source

Step 11

Select the correct Driver Interface from the Driver Interface pull down list.

ASW Driver

Step 12

Enter the Topic.

Getting Started MQTT 5

Topic

Step 13

Set the Topic Timeout – 0 = Topic will never timeout. Any number greater than 0 will cause the data to be Bad Data Quality if the broker does not publish within the time frame specified.

AWS Topic Timeout

Step 14

Select to include Timestamp and or Data Quality to the topic.

This will publish to the specified topic above OAS/Items Sent/Timestamp  and or OAS/ItemsSent/Quality.

AWS Settings

Step 15

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 OPC Systems component as demonstrated in the Form FormConfigureCSV in the WinForm Example Code application that installs with Open Automation Software in the Program Group Open Automation Software.  This component can be used in any .NET application includes Web Services, Windows Services, WPF Applications, and ASP.NET or .NET MVC Web Applications.

Step 16

Select the Save button on the toolbar at the top.

Save

Step 17

Create a directory on the local C: drive with the name OASDemo.

Save the file DemoTags.tags in the directory C:\OASDemo\.

Save Tags

Step 18

Under Configure – Options set the Default Tag Configuration File so when the computer restarts the tag file will automatically be loaded.

Review the Data Route product feature to move data from another tag to AWS

Getting Started Raspberry Pi GPIO

The Open Automation Software platform has a built in communication driver for General Purpose Input / Output when deployed on a Raspberry Pi 4.  Tags can be defined to read or write to GPIO pins.

You can view the OAS GPIO Setup Video to familiarize yourself with the following steps to setup GPIO communications on your Raspberry Pi 4.

  • 00:00 – Introduction
  • 00:11 – GPIO Driver
  • 00:16 – Written tutorial
  • 00:28 – Download and Install OAS on the Raspberry Pi
  • 00:53 – OAS for Linux Download
  • 01:06 – Set Up Access to the GPIO Driver
  • 01:48 – Reboot the System
  • 01:55 – Configure the Pins
  • 03:05 – Configure more tags options
  • 03:32 – Knowledge Base
  • 03:45 – Save changes to tag configuration
  • 04:24 – Transfer data
  • 05:07 – Learn More

The following steps can be used to setup communications with the GPIO pins.

Step 1

Download and install OAS onto Raspberry Pi 4 device.  View the Raspberry Pi Installation guide for an easy to following video instructions or use the Linux Installation guide for step by step instructions to use the simple install script.

Step 2

Setup access to gpiomem for the user account the OASEngine is running under.  The default is oasuser.

This is achieved by adding a rules file to etc/udev/rules.d/.

Log in to the root account and change directory to etc/udev/rules.d/.

ssh ubuntu@<ip address of Raspberry Pi>
cd /etc/udev/rules.d/

Create a file oas-gpio.rules with an editor with the following contents, then save the file.

SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:oasuser /dev/gpiomem && chmod -R 660 /dev/gpiomem'"

To create and edit the file you can use nano.

sudo nano oas-gpio.rules

Reboot the system.

sudo reboot

Step 3

OASFrom a Windows system start Configure OAS application from the program group Open Automation Software.

Step 4

Select Configure-Tags.

Configure Tags

Enter the IP Address of the Raspberry Pi device and click Select.

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

Step 5

Select ADD GROUP to add the group GPIO and click OK.  The group name can be anything you like, in this example it will be GPIO.

With the GPIO group selected click on ADD TAG to a tag with the name Pin 5.  The tag name can be anything you desire.  In this example we are assigning to GPIO Pin 5 so we will name it Pin 5.

Step 6

Change the Data Type of the tag to Boolean.

Change Data Source Tag property to GPIO.

Set the Pin Mode to one of the following.

Input: Read Only – Configures the GPIO pin in floating mode, with high impedance.
InputPullDown: Read Only – Configures the GPIO pin as high impedance with a pull-down resistor to ground.
InputPullUp: Read Only – Configures the GPIO pin as high impedance with a pull-up resistor to the voltage charge connection (VCC).
Output: Write Only – Configures the GPIO pin in strong drive mode, with low impedance.

Note: A pin cannot be set to both Input and Output.  Inputs are read only.  Outputs are write only.

When defining the pin as an input set the desired Polling Rate for the update speed.

Select Apply Changes to activate the pin communications.

Step 7

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 and Drivers using the OPCSystems .NET component with the TagCSVImport and DriverInterfaceCSVImport methods or the REST API.

Step 8

Select the Save button on the toolbar at the top.

Save Button

Optionally create a directory on the Raspberry Pi and specify a file name to save to and select SAVE.

Step 9

Under Configure – Options set the Default Tag Configuration File so when the device restarts the tag file will automatically be loaded.

Getting Started – Node Red

OAS provides a simple and easily interface to move data between Allen Bradley, Siemens, Modbus, OPC UA/DA Servers, Databases, .Net applications and Node Red.

For a complete list of  Data Sources and Data Destinations that the OAS MQTT Broker interfaces  with, see the links below:

The video below is a complete tutorial on creating a Node Red Flow and Dashboard utilizing the OAS MQTT Broker:

  • 0:00 – Introduction
  • 0:09 – How to Integrate the OAS MQTT Broker with Node Red
  • 0:21 – Pull data from a wide variety of data sources
  • 0:46 – Instructions installing node red
  • 0:52 – Node Red Dashboard installing instructions
  • 1:00 – Open up Browser and go to your node red editor
  • 1:14 – Network Section
  • 1:22 – OAS as an MQTT Broker
  • 1:30 – Properties Menu
  • 2:44 – Add Debug Node to the flow and connect to OAS MQTT in node
  • 3:05 – Standard JSON Format
  • 3:15 – Separate the message out into individual values
  • 4:08 – Result
  • 5:16 – Level Displayed in Real Time
  • 5:28 – Write Back to OAS
  • 5:52 – Pull an MQTT out Node onto the flow to write back to OAS
  • 6:18 – Dashboard Automatically Updates
  • 6:22 – Pump Tag
  • 7:09 – More Information

 

Step 1

Set up the OAS MQTT Broker: /data-destinations/mqtt-broker/mqtt-broker/.

 

Step 2

Open the Node Red Editor and start a new flow.  To read data from the OAS MQTT broker pull an MQTT In icon out onto the flow. To write data to the MQTT Broker pull an MQTT Out icon out onto the flow. 

 

Step 3

Double-click the MQTT In or MQTT Out node to bring up the properties window.  Select Add new mqtt-broker from the Server dropdown and then click the pencil icon next to it.

 

In the server properties box, enter the OAS MQTT Broker Name and IP address. You can add a Client ID or leave it blank to auto generate an ID. Select Update when complete.

 

Step 4

You are now back to the MQTT Node.

Select the server you created in Step 3.

Enter an OAS Tag as the Topic and select a parsed JSON object as the output.

 

To access OAS tags set your topic to the OAS standard naming convention. A few examples below.


  • Read the value from the Ramp tag on the local OAS service. Topic = Ramp.Value
  • Read the Description from the Ramp tag on the local OAS Service. Topic = Ramp.Description
  • Read the value of Alarms Not Acked tag in the subgroup Alarms on the local OAS service. Topic = Alarms.Active Not Acked.Value


Read the value of the Ramp tag from a remote OAS service. Topic = \Domain or IP address\Ramp.Value

Basic Networking:

\\192.168.0.1\Ramp.Value

Live Data Cloud Networking from local OAS Engine:

RemoteSCADAHosting.myLiveDataCloudNode.Ramp.Value

Live Data Cloud Networking through remote OAS Engine:

\\192.168.0.1\RemoteSCADAHosting.myLiveDataCloudNode.Ramp.Value

For more information on Tag naming conventions, please see the Tag Variables section of the Knowledge Base.

Step 5

OAS sends tag data in a standard JSON format that includes the value, time stamp and data quality.

A sample message is below.

Example Payload for Ramp.Value: {“Value”:84.0,”TimeStamp”:”2020-07-22T12:59:44-04:00″,”Quality”:true}

To segregate the payload in to separate messages add a split node to your project.

Check the Copy key to box and change it to msg.Topic as shown below.

Step 6

Now that you have separate messages add a switch node to access each message or the specific messages you want.

A complete Node Red Flow can be downloaded here.

MQTT Broker

OAS is both a MQTT Client and MQTT Broker.

To interface with another MQTT Broker please see the Getting Started MQTT guide.

To send and receive data to a Sparkplug B Edge of Network Nodes see the Getting Started Sparkplug B Host App guide.

To enable OAS as a Sparkplug B EoN Node to interface with Host and Client Applications see the Getting Started Sparkplug B EoN Node guide.

The Open Automation Software MQTT Broker is built into the OAS Engine which can be deployed on both Windows and Linux operating systems.  MQTT Broker support was added to OAS version 15.00.0001 and does require a license of the MQTT driver to enable read and write functionality.

The OAS MQTT Broker supports reading, and writing to all local and remote OAS Tags, including Live Data Cloud.

You can view the MQTT Broker Video to familiarize yourself with the following steps to interface with local and remote OAS Tags.

  • 0:00 – Introduction – OAS as MQTT Broker
  • 0:15 – OAS as MQTT Client and MQTT Broker
  • 0:20 – MQTT Client
  • 0:40 – MQTT Protocol
  • 0:44 – What’s MQTT Broker
  • 0:58 – Where is built MQTT Broker
  • 1:07 – What MQTT Broker support and requires
  • 1:29 – How to Interface MQTT Client with OAS as an MQTT Broker
  • 1:41 – How to verify if you have a valid license for MQTT
  • 2:07 – Set up OAS as a MQTT Broker
  • 3:23 – Set up to Subscribe to OAS MQTT Broker
  • 5:54 – Sending a JSON message to the OAS MQTT Broker from MQTT Client
  • 7:08 – More information

The following guide demonstrates how to interface an MQTT Client with OAS as a MQTT Broker.

Step 1

After installing Open Automation Software the verify you have a license of MQTT on OAS Engine that the MQTT Client will connect with.

Use the Configure OAS application and go to Configure-License and use Select to check the OAS Engine that MQTT appears in the Enabled Drivers list.

Drivers

Step 2

To setup the OAS MQTT Broker go to Configure-Options and select the MQTT Broker tab.

MQTT Broker Options

  • Enter the ID you want to use for the OAS Broker in the OAS MQTT Broker field.
  • Choose either the default broker port (1883) or enter a new port into the OAS MQTT Broker Port field.
  • For SSL/TLS, choose either the default broker SSL port (8883) or enter a new port into the OAS MQTT Broker SSL Port field.
  • If you want to use SSL/TLS, Check the box for OAS MQTT Broker Enable SSL.
    • In the MQTT Private Key File field select Browse and select your private key file.
    • If you have a password assigned to the private key enter it into the MQTT Private Key Password field.
  • Enter the username in the MQTT Client Username field to require MQTT Clients to connect using a specific username.
  • Enter the password in the MQTT Client Password field to require MQTT Clients to connect using a specific password.
  • Optionally enter Topic Aliases to map topic names to OAS tag names.  This is only required if the MQTT client cannot define the topics to interface with.

Step 3

If security is left to the Default to Enable All Features in all OAS Engines you can proceed to Step 4.

If Security has been setup on any of the OAS Engines to restrict Reading Tags or Writing Tags go to Configure-Options and select the Remote Services tab.

OAS Service User

Set the Security User Name and Security Password to user to gain access to the remote OAS Engine for read and write access to the tags to be monitored and set by the MQTT Broker.

Step 4

The OAS MQTT Broker is now ready for use.

Naming Conventions

To access OAS tags set your topic to the OAS standard naming convention. A few examples below.

  • Read the value from the Ramp tag on the local OAS service. Topic = Ramp.Value
  • Read the Description from the Ramp tag on the local OAS Service. Topic = Ramp.Description
  • Read the value of Alarms Not Acked tag in the subgroup Alarms on the local OAS service. Topic = Alarms.Active Not Acked.Value
  • Read the value of the Ramp tag from a remote OAS service. Topic = \\Domain or IP address\Ramp.Value

Basic Networking:

\\192.168.0.1\TagName.Value

Live Data Cloud Networking from local OAS Engine:

RemoteSCADAHosting.myLiveDataCloudNode.TagName.Value

Live Data Cloud Networking through remote OAS Engine:

\\192.168.0.1\RemoteSCADAHosting.myLiveDataCloudNode.TagName.Value

The payload is in standard JSON format and includes the Value, Timestamp, and Quality.

Example Payload for Ramp.Value: {“Value”:84.0,”TimeStamp”:”2020-07-22T12:59:44-04:00″,”Quality”:true}

To Write to an OAS Tag use the same topic format as described above.

You can publish to any existing Tag.

You can create tags with the Data Type set to JSON in OAS to be able to publish extended meta data on OAS Tags. Using the JSON Handling in OAS you can parse the JSON message for extended functionality.

Wildcards

The following wildcards are supported with OAS version 18.00.0041 or greater.

  • # – Subscribe to all tags from the OAS Engine for the .Value variable of each tag.
  • +/<tag variable> – Subscribe to all tags from the OAS Engine for the tag variable specified.  Example: +/DigitalAlarmActive

Deployment

You can deploy the OAS Engine to multiple servers on Windows or Linux using standard deployment or Docker containerized deployment, each OAS MQTT Broker supports communications to any OAS Engine.

OPC UA Client

OAS is both an OPC UA Client and OPC UA Server.

The Open Automation Software OPC UA Server is built into the OAS Engine which can be deployed on both Windows and Linux operating systems.  OPC UA Server support was added to OAS version 14.00.0042 and does require a license of the OPC Client Connector to enable read and write functionality.

The OPC UA Server supports browsing, reading, and writing to all local and remote OAS Tags, including Live Data Cloud, provided the OAS service hosting the Tags has a license of OPC Client.

If you want interface OAS with an OPC UA Server please see the Getting Started OPC UA Server guide.

The following guide demonstrates how to interface an OPC UA Client with OAS.

Step 1

After installing Open Automation Software verify you have a license of OPC Client on all OAS Engines that you want to interface with.  A license of OPC Client is not required on the OAS Engine where the OPC UA Server is running unless you want to communicate with the local tags on the OAS Engine.

Use the Configure OAS application and go to Configure-License and use Select to check all OAS Engines that the OPC Client product appears in the Enabled Products list.

Step 2

If security is left to the Default to Enable All Features in all OAS Engines you can proceed to Step 3.

If Security has been setup on any of the OAS Engines to restrict Tag Browsing, Reading Tags, or Writing Tags implement 1 of the 3 possible service authentication methods for the OAS OPC UA Server to gain access to the Tags.

Option 1: Go to Configure-Options-OPC and enable the property Allow OAS OPC UA Server on all OAS Engines the server will interface with.

Allow OAS OPC UA Server

Option 2: Go to Configure-Options-Remote Services and set the OPC UA Security Access to OASServiceUser and set Security User Name and Security Password to the user login that would allow Tag Browsing, Reading Tags, and Writing Tags on all OAS Engines.

OAS Service User

Option 3: Go to Configure-Options-Remote Services and set the OPC UA Security Access to OPCClientUser.  Then the OPC Client User Authentication will be set to the username and password to the user login that would allow Tag Browsing, Reading Tags, and Writing Tags on all OAS Engines.

OPC UA Client User

Step 3

In the OPC UA Client software use the endpoint url opc.tcp://localhost:58728 to connect to the server.  You can change the port number under Configure-Options-Network of the OAS Engine where the server is hosted with the property OAS OPC UA Server Port Number.

OAS OPC UA Server Port

OAS OPC UA Server Endpoint

Step 4

Connect to the server.

Note: If you are unable to connect to the OAS OPC UA Server due to a certificate security error that is shown in the OAS System Errors go to C:\ProgramData\OpenAutomationSoftware\pki-server\ on Windows or the pki-server sub-directory where the OAS Engine is located on Linux and copy the files in the rejected\certs directory to trusted\certs.

Step 5

From the OPC Client browse either the Local service or a remote service under the Network branch.

OPC UA Server Network

To add network nodes or IP Addresses where other OAS Engines are running go to Configure-Options-Networking and add to the NETWORK NODES form.  These will appear under the Network branch. 

Network Node List

We have used 127.0.0.1 in this example to demonstrate the feature, but in actual use it is not needed as it would be the same as browsing Local.

You will be able to browse all Tag Groups and Tags from the local or remote OAS Engine to then see all property values available for a Tag.

Value is the most commonly used Variable.  See Tag Variables for a complete list of all variables possible.

OPC UA Tag Browse

The NodeId returned with be the full tag path and the property selected.  It this case Ramp.Value for the local Tag Ramp.

OPC UA NodeId

Refer to Basic Networking and Live Data Cloud Networking for how remote Tag NodeIds are returned.

Local Tag

myGroup.myTag.Value

Basic Networking

\\192.168.0.1\myGroup.myTag.Value

Live Data Cloud Networking from local OAS Engine

RemoteSCADAHosting.myLiveDataCloudNode.myGroup.myTag.Value

Live Data Cloud Networking though remote OAS Engine

\\192.168.0.1\RemoteSCADAHosting.myLiveDataCloudNode.myGroup.myTag.Value

RemotesSCADAHosting OPC UA Tag

Note: Live Data Cloud hosting is only required if the hosting server has a dynamic IP Address without a fixed IP Address or fixed network node name.  Basic Networking is the most common method of networking.

Step 7

Continue to browse additional Tag values to add to your OPC Client specifying the Publishing Rate for your desired update rate to your Client.

All Data Sources for OAS with a valid license are supported for communications through the OAS OPC UA Server.

You can deploy the OAS Engine to multiple server PCs, each OPC UA Server support communications to any OAS Engine with an OPC Client license that is also version 14.00.0042 or greater.