Tech Support Corner: DataHub Item Imports Made Easy

6 min read

May 2, 2024 2:00:00 PM

Cogent DataHub enables users to integrate diverse data sources quickly and efficiently within their industrial automation ecosystems. By providing multiple ways to consume, organize, and deliver data, handling multiple inputs is a strong suit of DataHub.

CSV import functionalities are available for a variety of plug-ins including OPC DA & UA Clients, MQTT Client, External & Local Historians, Bridging, and Modbus. In this blog, we'll delve into the format and import options of OPC UA items specifically tailored for DataHub's OPC UA Client configuration, but the concept is the same for all CSV imports in DataHub.

It's important to note that accessing the CSV import options requires the Cogent DataHub Remote Configuration interface. This interface has been a core feature of DataHub since the V9 release and is automatically installed with all DataHub packages. The Remote Configuration application facilitates configuring DataHub from different machines and interfacing with the configuration when the product is installed as a Service. Although it's not required to run as a service to use the Remote Configuration application and try the things we are teaching here, it is common in production to run as a service. If you want to run as a service in production, we highly recommend reviewing our blog on Running / Maintaining Cogent DataHub as a Service to get started. So unless you're wanting to follow along on your system, let's keep going.

How Can I Import Tags from CSV?

The first step is to log into your Remote Configuration session with a valid DataHub Username/Password previously configured in the Security options of DataHub. Once signed in, you will notice a very similar UI to the main DataHub application, and all accessible plug-ins are listed on the left side of the screen:

DataHub Remote Config Start

We now want to connect DataHub to an OPC UA Server to start collecting data from various devices configured in the server. Navigating to the OPC UA tab, select “Add” to start the configuration of a new UA Client connection.

DataHub OPC UA Connect Start

If this is your first time configuring an OPC UA connection in DataHub, our previous post on Exploring OPC UA - Configuring Cogent DataHub OPC UA Client & Server provides an in-depth guide on getting your connections running.

Once the OPC UA Endpoint is specified, and connectivity is successfully verified with the Connection Test, we can begin exploring the Item Selection options. Two options are provided under this section.

DataHub OPC UA Connect Item Select

'Load All Nodes on Server' will attempt to query the OPC UA Server for all available OPC UA nodes and provide this data in the specified Data Domain Name. A node is an entity representing some form of information in the Server space, encompassing beyond simple tags, and potentially numbering in the hundreds of thousands or more.

Alternatively, 'Manually Select Nodes' empowers users to navigate through the OPC UA Server namespace and designate which nodes should be read by selecting them.

Each option presents its own set of drawbacks. Loading all objects may introduce unnecessary overhead to the system, while manually selecting nodes can become time-consuming, especially when dealing with thousands of required tags.

Fortunately, by leveraging the convenience of Excel and CSV files, we can quickly create a list of specific Node IDs we'd like to request as the client. This removes the tedious task of selecting each node manually, while also helping in optimizing the connection by solely requesting essential data.

Below is a quick excerpt of the CSV file created for the import, this utilized the generated names and addresses from the OPC Server. DataHub simply requires the properties of tag name, and the OPC UA NodeID to properly add the specified items. The beauty of this is that some OPC UA Servers allow for a CSV in a similar format to be exported, which can then be massaged into a format suitable for DataHub to import.

DataHub Excel Sheet

Select Configure Nodes to open the Node browsing interface. In the bottom left corner, an option for Import CSV is now available.

DataHub Data Browser Start

This option launches the Import Items window with settings to handle conflicts in previous item references, specifying the file location, and additional format handling.

DataHub CSV Import Start

The CSV file utilized contains a simplified list of references sourced from the configured OPC UA Server, TOP Server, which interfaces with a Siemens S7-1500 PLC. Commonly OPC UA compliant servers and devices allow for the direct export of tag list definitions. In this scenario I opted to export only the tags from the Internal Memory folder of the PLC, as there was no necessity to retrieve data from the entire set of over 30,000 configured tags within the device.

Now that we've selected our file, and mapped the appropriate properties to the corresponding columns, select OK to finalize the import.

DataHub Imported Item View

The references from our CSV file now appear in the right-side pane of the browsing selection, displaying both the NodeID and Local Point Name utilized in DataHub. Selecting OK on this screen will bring us back to the OPC UA Connection options to finalize any remaining changes.

With the OPC Items successfully imported, ensure the connection is enabled with a checkmark next to the name, and press Apply in the bottom right of the main configuration window to save changes.

Once the connection reaches a status of Running, launch the View Data window and navigate to the appropriate Data Domain to verify the real-time values:

DataHub View Data

Conclusion

We have now successfully created an OPC UA connection from Cogent DataHub utilizing only a specified list of items. With the newly incorporated tags available in DataHub, we can seamlessly integrate this data for various purposes using a combination of DataHub Plug-ins.

Email us at support@softwaretoolbox.com with your questions and subscribe to our blog for more quick and easy DataHub tutorials and tips. Ready to try it for yourself? Be sure to download the free DataHub trial.

Download DataHub free trial

 

Connor Mason
Written by Connor Mason

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback and questions on posts are always welcomed - just use the area at the bottom of any post.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all