Videos – Sparkplug B

Sparkplug B

Setup OAS as a Sparkplug B Edge of Network Node and also a Host Application.

  • 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

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

Troubleshoot Bad Data

How to identify and resolve communications errors with data sources.

  • 0:00 – Introduction
  • 0:40 – Bad Tags
  • 3:30 – System Errors
  • 4:20 – Watch Window
  • 6:20 – Error Logging
  • 7:20 – Troubleshooting Guides
  • 8:55 – Contact Us

Total

View the following video for explanation of each parameter and how to enable Total for a tag:

  • 00:00 – Introduction
  • 00:17 – Define Properties
  • 00:30 – Create a New Tag
  • 03:30 – Totalization Process
  • 06:42 – Reset Function
  • 08:34 – Control the active state
  • 09:53 – Set the initial value
  • 11:10 – Persist the total when system is restarted
  • 12:51 – More Questions

When this feature is enabled the current value will be summed at the sample rate specified with each value multiplied by the total gain before addition to the total.

Total Variables:

The Total feature will keep track of the following:

  • Total – The summation of all sampled values.
  • TotalSamples – The number of samples added since the last total reset.
  • TotalAverage – The total divided by the number of samples.
  • TotalPrevious – The previous total when the last reset was performed.
  • TotalPreviousSamples – The previous number of samples when the last reset was performed.
  • TotalAverage – The previous average when the last reset was performed.

The following image shows how the points will appear for connection in a client.

Browsing Total Variables

Configuration Properties:

Total Properties

The following configuration properties are used to enable and control the summation of values.

Enable Total

Enables the summation of the current value to update the Total variables.

Total Active

When enabled totalizing is active at the specified sample rate.
When disabled totalizing is paused.

Total Active by Tag

When enabled Active state is controlled by a Boolean tag value.

Total Sample Rate

The rate at which the value * gain is added to the total in seconds.

Total Gain

The gain will be multiplied to the value before adding to the total.
Use a negative gain or value if you want the total to decrease on each sample.

Total Gain by Tag

When enabled the gain to multiply to value is controlled by Tag.

Total Initial Value

The value that the total will be initialized to when the total is reset.

Total Reset Daily

When enabled the total is set to the Total Initial Value on the reset hour and minute.

Total Reset Monthly

When enabled the total is set to the Total Initial Value on the reset hour and minute on the first day of the month.

Total Reset by Tag

When enabled a Boolean tag transition from false to true will set the total to the Total Initial Value.

 

Retain Totals on Service Restart

To retain the total values after a system restart go to Configure-Options-Retain Values and enable to retain Totals to a file.

Retain Totals

You can optionally specify a save frequency in hours to save the live total values at a specified rate.  If the save Frequency is left at 0 the totals are only saved when the runtime is stopped or an orderly system shutdown.

Troubleshooting – OPC UA

Troubleshoot Bad Data

How to identify and resolve communications errors with data sources.

  • 0:00 - Introduction
  • 0:40 - Bad Tags
  • 3:30 - System Errors
  • 4:20 - Watch Window
  • 6:20 - Error Logging
  • 7:20 - Troubleshooting Guides
  • 8:55 - Contact Us

OPC UA Server Connection Error
Below are some helpful troubleshooting steps to resolve connection errors with OPC UA server.
Bad Data Quality

Server Url

The Server Url under Configure-Drivers must be specified correctly to then browse for the available Security Profiles.
Configure Drivers
OPC UA Server Url
Refer to the OPC UA server vendors documentation for the correct endpoint of the server. Once the Server Url is correctly set use the Browse button to select the Security Profile.

Certificate Authentication

If the OPC UA Server's authentication certificate is rejected it will be placed in C:\ProgramData\OpenAutomationSoftware\pki\rejected\certs on Windows or the pki\rejected\certs sub-directory where the OAS Engine is located on Linux.  To resolve and move the OPC UA Server's certificate file in the rejected\certs directory to trusted\certs.

OAS Certificate Creation

Version 18.0.0.17 of OAS added the ability to self create a certificate for OPC UA Servers and Clients to authenticate against.  Check the current version under Configure-System Status and if older than version 18.0.0.17 update the version of OAS if you are receiving a certificate authentication error under Configure-System Errors.

User Authentication

If the OPC UA Server requires a user name and password to validate the connection enable User Security under Configure-Drivers and specify the Username and Password that is required by the OPC UA Server.
Configure Drivers
OPC UA Username

System Errors

Select Configure-System Errors and expand any OPC UA or Driver Interface error to see the details of the error.
Menu Configure System Errors
The information provided can often help you determine the cause of communication failures.
The history of all systems errors can be found in the OAS Error Log specified under Configure-Options-System Logging.
Menu Configure Options
Error Log Path

Log OPC UA Communications

You can enable the OPC UA transaction logging under Configure-Options-System Logging to track all interface calls to the OPC UA server.
Menu Configure Options
OPC UA Transaction Logging
Specify the location of where the communication logs will be saved with the property Transaction Log Path further down in System Logging.
Transaction Log Path
There will be multiple files generated with the opc-ua within the file name and also the base OAS Transactions file.

UA Expert

The UA Expert program is a good test application to communicate to OPC UA server to verify the server can be interfaced with. You can download UA Expert from https://filedownloads.openautomationsoftware.com/tools/uaexpert.zip.

OPC UA Server Connection Error

Below are some helpful troubleshooting steps to resolve connection errors with OPC UA server.

Bad Data Quality

Server Url

The Server Url under Configure-Drivers must be specified correctly to then browse for the available Security Profiles.

Configure Drivers

OPC UA Server Url

Refer to the OPC UA server vendors documentation for the correct endpoint of the server.

Once the Server Url is correctly set use the Browse button to select the Security Profile.

Certificate Authentication

If the OPC UA Server’s authentication certificate is rejected it will be placed in C:\ProgramData\OpenAutomationSoftware\pki\rejected\certs on Windows or the pki\rejected\certs sub-directory where the OAS Engine is located on Linux.  To resolve and move the OPC UA Server’s certificate file in the rejected\certs directory to trusted\certs.

OAS Certificate Creation

Version 18.0.0.17 of OAS added the ability to self create a certificate for OPC UA Servers and Clients to authenticate against.  Check the current version under Configure-System Status and if older than version 18.0.0.17 update the version of OAS if you are receiving a certificate authentication error under Configure-System Errors.

User Authentication

If the OPC UA Server requires a user name and password to validate the connection enable User Security under Configure-Drivers and specify the Username and Password that is required by the OPC UA Server.

Configure Drivers

OPC UA Username

System Errors

Select Configure-System Errors and expand any OPC UA or Driver Interface error to see the details of the error.

Menu Configure System Errors

The information provided can often help you determine the cause of communication failures.

The history of all systems errors can be found in the OAS Error Log specified under Configure-Options-System Logging.

Menu Configure Options

Error Log Path

Log OPC UA Communications

You can enable the OPC UA transaction logging under Configure-Options-System Logging to track all interface calls to the OPC UA server.

Menu Configure Options

OPC UA Transaction Logging

Specify the location of where the communication logs will be saved with the property Transaction Log Path further down in System Logging.

Transaction Log Path

There will be multiple files generated with the opc-ua within the file name and also the base OAS Transactions file.

UA Expert

The UA Expert program is a good test application to communicate to OPC UA server to verify the server can be interfaced with.

You can download UA Expert from https://filedownloads.openautomationsoftware.com/tools/uaexpert.zip.

How to Transfer Data from Siemens to Kafka

Siemens Kafka
Siemens Kafka


Open Automation Software can be setup to transfer data from S7 Controllers to Kafka brokers.  Use the following guide to setup data transfer from S7-200, S7-300, S7-400, S7-1200, and S7-1500 controllers to Kafka. This tutorial walks you through downloading and installing OAS, defining the Siemens S7 interface, creating data source tags, and publishing data to Kafka in a JSON format. The message topic to publish is automatically formatted to include tag id, value, quality, and timestamp. All JSON packet parameters are configurable to deliver the Kafka topic message in the desired format.

Step 1. Download and Install the Open Automation Software and Start the OAS Service

If you have not already done so, you will need to download and install the OAS platform.  Fully functional trial versions of the software are available for Windows, Windows IoT Core, Linux, Raspberry Pi and Docker on our downloads page.

On Windows run the downloaded Setup.exe file to install one or more of the Open Automation Software features. Select the default Typical installation if you are not sure what features to use or the Custom installation if you want to save disk space on the target system.  When prompted agree to the End User License Agreement to continue the installation.

For more detailed instructions and video tutorials, visit the installation guide for your system:
Windows Installation | Linux Installation | Raspberry Pi Installation | Dockers Installation

When the installation is finished the OAS Service Control application will appear.  Use this application to start the 4 Services. If this is the first time installing the software it will automatically enter Runtime with an example Tag Configuration.


Step 2. Configure Your Siemens Data Source

  1. First, you will need to open the Configure OAS application from the program group Open Automation Software.

  2. Select Configure >> License from the top menu and verify that Siemens is one of the available Drivers in the lower left of the form. The demo license will have this by default. If you do not see Siemens available, contact support@openautomationsoftware.com to update your license.

  3. Select Configure >> Drivers from the top menu.


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


  5. The Configure Drivers Screen will appear. Select Siemens from the Driver dropdown box.


  6. Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with a Siemens Data Source.

  7. Define the properties for the desired physical connection.

  8. Click the Add Driver button above the Driver list in the left pane to add the Driver Interface as an available selection when defining Tags in the next step.

For more detailed instructions on configuring your Siemens data source, click here to see our Getting Started Siemens tutorial.


Step 3. Configure Your Siemens Tags

OAS provides multiple ways to add and define tags:

To add a Tag manually:

  1. In the OAS Configure Application, select Configure >> Tags from the top menu.


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


  3. Click on the Add Tag button located at the top of the Tag browser on the left portion of the screen.


  4. A dialog box will appear. Enter a name for your new tag and click ok.

  5. A configuration screen will appear for your new tag. Select your data source type in in the Data Source dropdown box.


  6. Specify the correct data type in the Data Type dropdown box.

  7. Click Apply Changes at the bottom right of the window.

For more detailed instructions on configuring your tags, click here to see our Getting Started Tags tutorial.


Step 4. Define Kafka Topic and Tags to Publish

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this connection and define the properties.

Set the driver to Kafka. Set the Bootstrap Servers of the brokers you wish to publish to.

Kafka localhost

If sending data to the cloud set the appropriate Security Protocol.

When connecting with Confluent Cloud set the SASL Username with the provided API Key and the SASL Password with the Secret Key.

Kakfa Sasl Ssl

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

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

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

When publishing as one topic to optimize communications with Kafka multiple messages are sent for each publish when the number of tag value changes exceeds the Max Tags Per Publish limit.

Max Tags per Publish

Specify the Tag IdValue 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.

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.

Select the Add Driver button in the lower part of the form to add the Driver Interface.

Add Driver

Data is now publishing to the Kafka broker.

Select the Save button from the toolbar to save your configuration.

Save Button

You can view the Getting Started with Kafka Video to familiarize yourself with the following steps to setup OAS as a producer and consumer of Kafka.

  • 00:00 – Introduction
  • 01:20 – Kafka Producer
  • 09:07 – Kafka Consumer
  • 10:20 – Save Configuration
  • 11:00 – Transaction Logging
  • 11:45 – Publish 100,000 Values per Second
  • 15:50 – Contact Us

How to Transfer Data from OPC UA to Kafka

OPC UA Kafka

OPC UA Kafka

Open Automation Software can be setup to transfer data from OPC UA servers to Kafka brokers.  Use the following guide to setup data transfer from OPC UA servers to Kafka. This tutorial walks you through downloading and installing OAS, defining the OPC server interface and automated tag creation with the One Click OPC UA feature, and publishing data to Kafka in a JSON format. The message topic to publish is automatically formatted to include tag id, value, quality, and timestamp. All JSON packet parameters are configurable to deliver the Kafka topic message in the desired format.

Step 1. Download and Install the Open Automation Software and Start the OAS Service

If you have not already done so, you will need to download and install the OAS platform.  Fully functional trial versions of the software are available for Windows, Windows IoT Core, Linux, Raspberry Pi and Docker on our downloads page.

On Windows run the downloaded Setup.exe file to install one or more of the Open Automation Software features. Select the default Typical installation if you are not sure what features to use or the Custom installation if you want to save disk space on the target system.  When prompted agree to the End User License Agreement to continue the installation.

For more detailed instructions and video tutorials, visit the installation guide for your system:
Windows Installation | Linux Installation | Raspberry Pi Installation | Dockers Installation

When the installation is finished the OAS Service Control application will appear.  Use this application to start the 4 Services. If this is the first time installing the software it will automatically enter Runtime with an example Tag Configuration.


Step 2. Configure Your OPC UA Data Source

  1. First, you will need to open the Configure OAS application from the program group Open Automation Software.
  2. Select Configure >> License from the top menu and verify that OPC UA is one of the available Drivers in the lower left of the form. The demo license will have this by default. If you do not see OPC UA available, contact support@openautomationsoftware.com to update your license.
  3. Select Configure >> Drivers from the top menu.

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

  5. The Configure Drivers Screen will appear. Select Siemens from the Driver dropdown box.

  6. Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with a OPC UA Data Source.
  7. Define the properties for the desired physical connection.
  8. Click the Add Driver button above the Driver list in the left pane to add the Driver Interface as an available selection when defining Tags in the next step.

For more detailed instructions on configuring your OPC DA data source, click here to see our Getting Started OPC UA tutorial.


Step 3. Configure Your OPC UA Tags

OAS provides multiple ways to add and define tags:

To add a Tag manually:

  1. In the OAS Configure Application, select Configure >> Tags from the top menu.

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

  3. Click on the Add Tag button located at the top of the Tag browser on the left portion of the screen.

  4. A dialog box will appear. Enter a name for your new tag and click ok.
  5. A configuration screen will appear for your new tag. Select your data source type in in the Data Source dropdown box.

  6. Specify the correct data type in the Data Type dropdown box.
  7. Click Apply Changes at the bottom right of the window.

For more detailed instructions on configuring your tags, click here to see our Getting Started Tags tutorial.


Step 4. Define Kafka Topic and Tags to Publish

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this connection and define the properties.

Set the driver to Kafka. Set the Bootstrap Servers of the brokers you wish to publish to.

Kafka localhost

If sending data to the cloud set the appropriate Security Protocol.

When connecting with Confluent Cloud set the SASL Username with the provided API Key and the SASL Password with the Secret Key.

Kakfa Sasl Ssl

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

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

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

When publishing as one topic to optimize communications with Kafka multiple messages are sent for each publish when the number of tag value changes exceeds the Max Tags Per Publish limit.

Max Tags per Publish

Specify the Tag IdValue 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.

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.

Select the Add Driver button in the lower part of the form to add the Driver Interface.

Add Driver

Data is now publishing to the Kafka broker.

Select the Save button from the toolbar to save your configuration.

Save Button

You can view the Getting Started with Kafka Video to familiarize yourself with the following steps to setup OAS as a producer and consumer of Kafka.

  • 00:00 – Introduction
  • 01:20 – Kafka Producer
  • 09:07 – Kafka Consumer
  • 10:20 – Save Configuration
  • 11:00 – Transaction Logging
  • 11:45 – Publish 100,000 Values per Second
  • 15:50 – Contact Us

How to Transfer Data from OPC to Kafka

OPC Kafka
OPC Kafka

Open Automation Software can be setup to transfer data from classic OPC DA 2.xx and 3.0 OPC servers to Kafka brokers.  Use the following guide to setup data transfer from OPC servers to Kafka. This tutorial walks you through downloading and installing OAS, defining the OPC server interface and automated tag creation with the One Click OPC feature, and publishing data to Kafka in a JSON format. The message topic to publish is automatically formatted to include tag id, value, quality, and timestamp. All JSON packet parameters are configurable to deliver the Kafka topic message in the desired format.

Step 1. Download and Install the Open Automation Software and Start the OAS Service

If you have not already done so, you will need to download and install the OAS platform.  Fully functional trial versions of the software are available for Windows, Windows IoT Core, Linux, Raspberry Pi and Docker on our downloads page.

On Windows run the downloaded Setup.exe file to install one or more of the Open Automation Software features. Select the default Typical installation if you are not sure what features to use or the Custom installation if you want to save disk space on the target system.  When prompted agree to the End User License Agreement to continue the installation.

For more detailed instructions and video tutorials, visit the installation guide for your system:
Windows Installation | Linux Installation | Raspberry Pi Installation | Dockers Installation

When the installation is finished the OAS Service Control application will appear.  Use this application to start the 4 Services. If this is the first time installing the software it will automatically enter Runtime with an example Tag Configuration.


Step 2. Configure OPC Server Tags

OAS provides multiple ways to add and define tags:

To add a Tag manually:

  1. In the OAS Configure Application, select Configure >> Tags from the top menu.

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

  3. Click on the Add Tag button located at the top of the Tag browser on the left portion of the screen.

  4. A dialog box will appear. Enter a name for your new tag and click ok.
  5. A configuration screen will appear for your new tag. Select OPC in the Data Source dropdown box.

  6. Use the Browse button to the right of the OPC Item to browse OPC Servers for the desired OPC Item.

  7. Select Local, the desired OPC Server, branch within the OPC Server, and OPC Item and click OK.

  8. Specify the desired OPC Update Rate for the Tag.
  9. Click Apply Changes at the bottom right of the window.

To add Tags with One Click OPC:

  1. In the OAS Configure Application, select Configure >> Tags from the top menu.

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

  3. To begin the One Click OPC process select the Group you would like to import to in the Tag configuration. If you want to import to the Root Level, select the Tags Group at the top of the tree.
    Then select the One Click Import button on the top menu bar.

  4. Click on the Import OPC DA 2.XX or 3.0 Items Button in the pop up window.

  5. Use the One Click OPC Wizard to browse for a branch as a starting position within an OPC Server or just select the OPC Server name itself to add all items from the selected OPC Server. For the best networking design select OPC Servers from Local even if you are configuring a remote OAS Service.

  6. Select to enable the options to Get Data Type from OPC Server and optionally the Descriptions.
    Additionally if you want to specify to Trend all of the points select Trend Points.
  7. Click Add Tags and it will automatically add all of the OPC Items from the OPC Server Branch you have selected and all of the sub Branches beneath it.
  8. Select the Save button on the toolbar at the top.

For more detailed instructions on Configuring OPC Server Tags, visit our Getting Started OPC tutorial or the One Click OPC tutorial or watch the video tutorial below:


Step 3. Define Kafka Topic and Tags to Publish

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this connection and define the properties.

Set the driver to Kafka. Set the Bootstrap Servers of the brokers you wish to publish to.

Kafka localhost

If sending data to the cloud set the appropriate Security Protocol.

When connecting with Confluent Cloud set the SASL Username with the provided API Key and the SASL Password with the Secret Key.

Kakfa Sasl Ssl

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

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

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

When publishing as one topic to optimize communications with Kafka multiple messages are sent for each publish when the number of tag value changes exceeds the Max Tags Per Publish limit.

Max Tags per Publish

Specify the Tag IdValue 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.

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.

Select the Add Driver button in the lower part of the form to add the Driver Interface.

Add Driver

Data is now publishing to the Kafka broker.

Select the Save button from the toolbar to save your configuration.

Save Button

You can view the Getting Started with Kafka Video to familiarize yourself with the following steps to setup OAS as a producer and consumer of Kafka.

  • 00:00 – Introduction
  • 01:20 – Kafka Producer
  • 09:07 – Kafka Consumer
  • 10:20 – Save Configuration
  • 11:00 – Transaction Logging
  • 11:45 – Publish 100,000 Values per Second
  • 15:50 – Contact Us

How to Transfer Data from MTConnect to Kafka

MTConnect Kafka
MTConnect Kafka

Open Automation Software can be setup to transfer data from MTConnnect data streams to Kafka brokers.  Use the following guide to setup data transfer from MTConnect to Kafka. This tutorial walks you through downloading and installing OAS, defining MTConnect interface with automated tag creation, and publishing data to Kafka in a JSON format. The message topic to publish is automatically formatted to include tag id, value, quality, and timestamp. All JSON packet parameters are configurable to deliver the Kafka topic message in the desired format.

Step 1. Download and Install the Open Automation Software and Start the OAS Service

If you have not already done so, you will need to download and install the OAS platform.  Fully functional trial versions of the software are available for Windows, Windows IoT Core, Linux, Raspberry Pi and Docker on our downloads page.

On Windows run the downloaded Setup.exe file to install one or more of the Open Automation Software features. Select the default Typical installation if you are not sure what features to use or the Custom installation if you want to save disk space on the target system.  When prompted agree to the End User License Agreement to continue the installation.

For more detailed instructions and video tutorials, visit the installation guide for your system:
Windows Installation | Linux Installation | Raspberry Pi Installation | Dockers Installation

When the installation is finished the OAS Service Control application will appear.  Use this application to start the 4 Services. If this is the first time installing the software it will automatically enter Runtime with an example Tag Configuration.


Step 2. Configure Your MTConnect Data Source

  1. First, you will need to open the Configure OAS application from the program group Open Automation Software.
  2. Select Configure >> License from the top menu and verify that MTConnect is one of the available Drivers in the lower left of the form. The demo license will have this by default. If you do not see MTConnect available, contact support@openautomationsoftware.com to update your license.
  3. Select Configure >> Drivers from the top menu.

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

  5. The Configure Drivers Screen will appear. Select MTConnect from the Driver dropdown box.

  6. Enter a meaningful Driver Interface Name that you will refer to this physical connection when defining Tags with a MTConnect Data Source.
  7. Leave Enable and Add Tags Automatically enabled.
  8. Specify the Live Data Url for the MTConnect stream.
  9. Click the Add Driver button above the Driver list in the left pane to add the Driver Interface as an available selection when defining Tags in the next step.

For more detailed instructions on configuring your MTConnect data source, click here to see our Getting Started MTConnect tutorial or watch the video tutorial below:


Note: OAS can automate the tag creation under the driver interface for MTConnect.

Step 3. Configure Your MTConnect Tags

OAS provides multiple ways to add and define tags:

To add a Tag manually:

  1. In the OAS Configure Application, select Configure >> Tags from the top menu.

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

  3. Click on the Add Tag button located at the top of the Tag browser on the left portion of the screen.

  4. A dialog box will appear. Enter a name for your new tag and click ok.
  5. A configuration screen will appear for your new tag. Select your data source type in in the Data Source dropdown box.

  6. Specify the correct data type in the Data Type dropdown box.
  7. Click Apply Changes at the bottom right of the window.

For more detailed instructions on configuring your tags, click here to see our Getting Started Tags tutorial.


Step 4. Define Kafka Topic and Tags to Publish

Select Configure-Drivers.

Configure Drivers

Enter a meaningful Driver Interface Name that you will refer to this connection and define the properties.

Set the driver to Kafka. Set the Bootstrap Servers of the brokers you wish to publish to.

Kafka localhost

If sending data to the cloud set the appropriate Security Protocol.

When connecting with Confluent Cloud set the SASL Username with the provided API Key and the SASL Password with the Secret Key.

Kakfa Sasl Ssl

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

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

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

When publishing as one topic to optimize communications with Kafka multiple messages are sent for each publish when the number of tag value changes exceeds the Max Tags Per Publish limit.

Max Tags per Publish

Specify the Tag IdValue 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.

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.

Select the Add Driver button in the lower part of the form to add the Driver Interface.

Add Driver

Data is now publishing to the Kafka broker.

Select the Save button from the toolbar to save your configuration.

Save Button

You can view the Getting Started with Kafka Video to familiarize yourself with the following steps to setup OAS as a producer and consumer of Kafka.

  • 00:00 – Introduction
  • 01:20 – Kafka Producer
  • 09:07 – Kafka Consumer
  • 10:20 – Save Configuration
  • 11:00 – Transaction Logging
  • 11:45 – Publish 100,000 Values per Second
  • 15:50 – Contact Us