TDengine + Manufacturing: How to Achieve Efficient OPC UA Data Integration

Chait Diwadkar
Chait Diwadkar
/
Share on LinkedIn

With the rapid advancement of smart manufacturing and the integration of various industrial automation systems, the amount of data generated in the manufacturing sector is growing exponentially. This not only places high demands on data storage but also presents challenges for real-time processing and analysis capabilities. Traditional manufacturing technologies struggle to comprehensively and accurately model and manage data, and traditional databases find it difficult to handle the rapid growth and real-time processing needs of this data.

TDengine is a time-series big data platform that has been committed to driving the digital transformation of the industrial and IoT sectors since its inception. As a critical sector in the industrial field, the manufacturing industry is naturally one of TDengine’s key focus areas. In the external data source access components of TDengine Enterprise/TDengine Cloud, we provide features such as MQTT, OPC UA, and OPC DA for direct data collection. This allows users to complete data integration with a simple web interface, without writing a single line of code. Although the manufacturing industry uses various protocols, we aim to help users reduce development costs as much as possible.

As an intermediary between IT and OT (Operational Technology), OPC UA (Open Platform Communications Unified Architecture) plays a crucial role. By directly collecting OPC UA protocol data, TDengine effectively solves issues like the poor performance, limited scalability, and high cost of traditional industrial real-time databases.

In OPC UA, physical quantities are represented by nodes. Each node has a unique identifier (NodeId). With TDengine’s data collector, we can connect to the OPC UA server and configure the relationship between OPC UA nodes and TDengine tables. For example, all floating-point data can be written into a floating-point super table, with each node’s NodeId becoming the sub-table name. Different tags, such as temperature, pressure, or speed, can be used to distinguish between sub-tables.

TDengine’s OPC UA data collector also supports simple calculations on each node’s collection timestamp, reception timestamp, and collection index. For instance: ts-(ts%1000) converts the millisecond-precision timestamp into second-precision. It also supports writing multiple OPC UA nodes to a single super table.

In summary, TDengine’s OPC UA data collector acts like a translator, capable of understanding the mapping requirements between the OPC UA data structure and the time-series database structure, ultimately merging them together seamlessly.

The entire data integration process requires only a few simple steps:

  1. For users who do not have TDengine Enterprise, register on TDengine Cloud in just 3 minutes at https://cloud.tdengine.com/auth and receive $820 in credits for use.
  2. In TDengine Cloud, create a database for storing OPC UA data (refer to TDengine’s database creation documentation for custom parameters or use the default configuration for quick testing).
  1. The demonstration will use Prosy’s OPC UA simulator to simulate solar panel data. This simulator is free and can be downloaded from the Prosys website. After installation, you can create some simple simulation data.
  1. Ensure that the agent plugin and OPC UA server are on the same network, and then follow the prompts to install and start the agent plugin. Finally, select “Add Data Source”.
  1. Fill in/select the custom task name, OPC UA type, select the agent plugin just created, and enter the OPC UA server’s IP and port.

In this example, we won’t set security or authentication parameters for testing purposes. Once the OPC UA server address is entered, click “Check Connection” to ensure that the agent can connect.

  1. Then, download the data points CSV template, adjust the contents as needed, or upload it without modification.
  1. There are two subscription modes: observe (reads the latest value of the data point) and subscribe (real-time pull and updates when data changes). The default is the latter.
  1. After completing the information, click “Add” to start the data synchronization from OPC UA to TDengine.
  1. Once the connection agent and data source tasks show as normal, you can check the OPC UA data in TDengine using SQL commands.

In this configuration process, there are several other optional configurations visible on the web page, but they are not required. Users can fill them out based on their actual needs.

Now, you have successfully completed the OPC UA data direct collection. The only time-consuming part of this process is matching the OPC UA data structure with TDengine’s super table structure. If you are already familiar with TDengine’s “Supertable-subtable” data model, this step will not take much time.

  • Chait Diwadkar

    Chait Diwadkar is Director of Solution Engineering at TDengine. Prior to joining TDengine he was in the biotechnology industry in technical marketing, professional services, and product management roles and supported customers in pharma, medical devices and diagnostics on analytical chemistry, and genetic platforms.