Having ready access to the wide array of industrial data available in an enterprise is increasingly important these days, for a variety of reasons. With ever-expanding applications for using "big data" towards efficiency initiatives such as digital twins, predictive analytics and predictive maintenance, having the ability to bring all of your industrial data together is essential.
In order to analyze that data, however, the upstream systems performing that analysis need access to the actual data - data that is typically widely dispersed geographically and even departmentally within locations. One interface that is relatively common for such systems is the ability to act as an HTTP (or REST) client.
This blog post will provide an overview of an easy and secure way to share industrial process data available common OPC UA, OPC DA and SQL database sources with big data and other systems that can act as an HTTP / REST Client using the OPC Router. You'll also have a chance to download our free guide with step-by-step instructions.
Big data applications need data, data and MORE data - from every facet of a business or process. The more sources and quantities of data, the more accurate predictive models can be for increasing efficiency and reducing downtime.
In the age of IoT, aggregating industrial process data to "the cloud" is becoming more and more the norm. It's pretty common for big data analytics tools to support some form of IoT interface. Our focus today is exposing industrial process data to analytics and other tools that have the ability to act as an HTTP client (also sometimes referred to as a REST client) and that aggregate data using HTTP GET requests to a data source.Now, just to be clear, it's not necessarily common for industrial process data sources to support natively acting as an HTTP server (i.e. if the analytics tool is an HTTP client, the data source it's sending an HTTP GET request to needs to be able to act as an HTTP server). It's far more common for such data to be accessible via OPC UA or OPC DA or to be stored in a database such as Microsoft SQL.
So how can an HTTP client access those data sources if they aren't native HTTP servers? We expose them to HTTP clients via an HTTP API using the OPC Router.
How to Expose OPC Servers and Databases via HTTP API
The OPC Router provides a flexible way to move data from point A to point B, while transforming, analyzing, and acting on said data. As one of many such flexible capabilities, OPC Router can expose a RESTful API Endpoint that HTTP Clients can use to extract data from the OPC Router.
And, since OPC Router also supports acting as an client to OPC UA, OPC DA and database sources, any of those data sources can then be accessed by HTTP clients. Let's talk a little about the steps required to expose your OPC servers and databases via HTTP.
1. Defining Data Sources and Destinations in OPC Router
The first step involves configuring all of the sources that data will be pulled from and all of the destinations for that data. To that end, OPC Router has a variety of plug-ins for interfacing with data sources and destinations.
In the scenario covered in this post (exposing OPC servers and databases to HTTP clients), our sources can be OPC UA servers, OPC DA server, databases or all of the above. So you would need an OPC UA Server plug-in, an OPC DA Server plug-in and/or a relational database plug-in corresponding to your database of choice (MS SQL, for instance).
And, after the data sources, there is the destination of that data to be considered. Plug-ins are used for destinations, too. In this case, we need the REST API plug-in to expose the collection of industrial process data to HTTP clients.
Detailed configuration of those plug-ins is beyond the scope of this post; however, you can request your copy of the free guide for step-by-step instructions.
2. Connecting Data Sources and Destinations in OPC Router
Once the data is available in OPC Router and the destination has been defined, the connection between the source and the destination must be configured. The visual workspace in OPC Router makes it easy to quickly wire up connections between a source and a destination.
The Transfer Objects Toolbox in OPC Router is a repository for all of the different possible triggers, data sources and destinations. The Connection workspace is a blank canvas supporting drag-and-drop of those transfer objects, after which they can be configured and linked together in a logical fashion to accomplish the desired data transfer operations.
For instance, an OPC UA/DA transfer object would be needed for each OPC server data source, a Database transfer object would be needed and a REST Trigger transfer object would be needed. Once the transfer objects are configured in the connection, the data flow between object fields is drawn, literally. Directional arrows are drawn between data sources and destinations in the desired flow and represent the flow of data between transfer objects in that direction.
Detailed configuration of the transfer objects and the links between them is beyond the scope of this post; however, you can request your copy of the free guide for step-by-step instructions.
3. Start Transferring Data by Deploying the OPC Router Configuration
And last, but not least, the configurations must be set "Productive" in the OPC Router in order to deploy the configuration to the runtime service. This is straightforward and easily accomplished using the big "Go Productive" button in the Production tab. Simply ensure the proper connections are checked and click the button.
The running state of the connections can even be reviewed using the State View in OPC Router to ensure that the expected operations for each connection are occurring normally.
Additionally, there are a variety of test HTTP clients out there available for verifying functionality in situations where the ultimate destination for the data may not be available but you want to get started testing. Our engineers commonly use a tool called Postman for such testing - Postman is the tool you will see referenced in the step-by-step guide.
So those are the basic steps involved when using OPC Router to turn your OPC and database sources into HTTP servers for access by HTTP / REST clients. With the extensive proliferation of OPC technology in the industrial world, you would be hard pressed to find a control device or piece of equipment that is not accessible. As such, OPC Router helps you take the next step towards greater efficiency via big data applications using all of that data.
Don't forget to subscribe to our blog to find out about the latest updates regarding OPC Router and for how-to videos on using OPC Router. Get the free step-by-step guide then try OPC Router with your own data sources.