Quick Implementation of OPC Data Storage to Database

Acquisition

Quick Implementation of OPC Data Storage to Database

Hongke

IIoT

Hongke OPC Solution

—— Quick Implementation of OPC Data Storage to Database

Hongke

Science

Program

Solution

01

OPC Introduction

OPC, which stands for OLE for Process Control, is an industrial standard based on Microsoft’s OLE, COM, and DCOM technologies. With the rapid development of automation systems in the 1990s, various standard automation software was developed by major automation manufacturers to access automation data in devices, utilizing countless different bus systems, protocols, and interfaces.

To eliminate interoperability barriers between automation software and hardware platforms, the OPC Foundation proposed the OPC standard, establishing a complete set of open interface, attribute, and method standards for communication between devices from different manufacturers. Depending on the different needs of industrial applications, the OPC Foundation mainly formulated three OPC specifications: OPC DA (Data Access), OPC AE (Alarms and Events), and OPC HDA (Historical Data Access). Later, due to the frequent use of OPC DA in practical applications, OPC is generally referred to as OPC DA.

Quick Implementation of OPC Data Storage to Database

Although OPC solved the problem of cross-vendor platform communication for devices, it relies on Windows’ COM/DCOM technology, which prevents its use on Linux or other systems. Additionally, in practical applications, complex DCOM configurations are required for OPC clients and servers. Furthermore, system components in Windows are susceptible to interference from other applications, leading to unstable communication, which is unsuitable for long-distance communication and typically only allows communication within factory-level local area networks. Once communication is interrupted, project reconfiguration and data tag addition are necessary. Meanwhile, OPC’s security is relatively low, as it primarily relies on the Windows system rather than a defined security mechanism within the OPC specification.

To address these issues, the OPC Foundation developed a new generation of OPC technology—OPC UA—based on OPC, enabling communication between different systems and devices with different protocols. To distinguish between the two generations of OPC technology, the previous generation is generally referred to as OPC Classic, while the new generation is called OPC UA.

Quick Implementation of OPC Data Storage to Database
Quick Implementation of OPC Data Storage to Database

02

OPC DA Data Storage to

Database

Despite the limitations of OPC DA to the Windows platform, and issues such as unstable communication and complex configurations, many devices and control systems in current industrial production, especially in manufacturing, still use OPC DA for data exchange. Additionally, with the rapid advancement of Industry 4.0, companies are continuously generating a large amount of device data. To safely and effectively store, retrieve, and manage device data, an increasing number of enterprises are adopting databases for data storage, thereby achieving efficient data management.

To implement OPC DA data storage to the database, Hongke provides a solution—the OPC Client for ODBC software, as illustrated in the system framework diagram below.

Quick Implementation of OPC Data Storage to Database

The Hongke OPC Client for ODBC software supports SQL Server, Access, Oracle, and other databases. This software can store data from the OPC DA Server into the database, supporting two writing methods: “table writing” and “custom writing”. The “table writing” method requires users to perform table mapping to write data, which is simple and easy to use; the “custom writing” method requires users to define SQL statements to write data, providing a higher degree of freedom. Therefore, users can choose different writing methods based on their needs. Additionally, this software can also write data from the database back to the OPC DA Server.

Thus, through the Hongke OPC Client for ODBC software, the challenge of storing OPC DA data to the database can be resolved, achieving efficient data storage and management.

Quick Implementation of OPC Data Storage to Database
Quick Implementation of OPC Data Storage to Database

03

OPC UA Data Storage to

Database

With the rapid advancement of OPC UA, more and more companies are using OPC UA technology to build global connectivity in factories, thus driving the rapid growth of OPC UA data sources in workshops and field environments. We previously encountered a client with around ten thousand devices; even using the OPC UA soft gateway for group management, there will eventually be approximately a thousand OPC UA servers. Therefore, with such a large number of OPC UA servers and the lack of unified data interfaces, how to store OPC UA data into the database has become a significant headache.

To achieve OPC UA data storage to the database, Hongke provides a solution—the OVL (Ogamma Visual Logger for OPC) software. The system framework diagram of this software is shown below.

Quick Implementation of OPC Data Storage to Database

This software has four main functions: data acquisition, data storage, data visualization, and data analysis. The data acquisition function is responsible for collecting data from the OPC UA Server; the data storage function is responsible for locally storing OPC UA Server data and then immediately forwarding it to the target database; the data visualization function acts as a REST backend for the SimpleJson data source plugin, enabling data visualization through Grafana; and the data analysis function is responsible for analyzing the data stored in the target database using specified tools.

With the Hongke OVL software, users only need to configure it simply to quickly collect OPC UA Server data and store it in the target database. The software supports traditional relational databases such as SQL Server and MySQL, as well as modern time-series databases like InfluxDB and Kafka, and MQTT Brokers like Mosquitto and Microsoft Azure IoT Hub.

Quick Implementation of OPC Data Storage to Database

Additionally, this software does not limit the number of OPC UA Servers that can be connected simultaneously or the number of OPC UA variables that can be collected at the same time, maximizing the ability to help users collect data from field OPC UA Servers. For devices that support OPC DA but not OPC UA, the Hongke OPC UA Tunneller software can be used to achieve conversion between OPC DA and OPC UA.

Quick Implementation of OPC Data Storage to Database

Moreover, the Hongke OVL software provides a REST API, allowing users to read data and view data collection and forwarding status parameters through the REST API. Users can also write applications using code to read and write OPC UA Server data via the REST API. The following is a simple GUI Python application.

Quick Implementation of OPC Data Storage to Database
Quick Implementation of OPC Data Storage to Database
Quick Implementation of OPC Data Storage to Database

04

Conclusion

In summary, the one-stop OPC solution provided by Hongke not only allows for the storage of OPC DA and OPC UA data into target databases but also offers powerful functionality and simple operation, quickly helping users achieve efficient data storage and management.

Related Solutions

The Hongke Solution: OPC UA Tunneller retains the reliable characteristics originally focused on OPC Classic, easily solving:

  • OPC Classic connection issues caused by Windows DCOM updates;

  • OPC Classic data communication through firewalls on specific ports, overcoming OPC connection timeouts and disconnections caused by DCOM;

  • Encryption of OPC data between OPC clients and servers to provide data privacy services;

  • Elimination of a series of issues related to the renovation and replacement of OPC Classic assets while offering extended functionality through a universal user-friendly interface, enabling you to quickly start and run OPC.

Quick Implementation of OPC Data Storage to Database

For many years, the Hongke Industrial IoT team has studied advanced international OPC UA-related technologies, gaining rich knowledge and experience, providing various solutions from hardware to software for numerous users in the industry, and is committed to serving smart factory and Industry 4.0 upgrade projects.

Quick Implementation of OPC Data Storage to Database

Hongke–Industrial IoT

Hongke is a high-tech company with over three years of experience in the Industrial IoT IIoT industry. Hongke collaborates with top companies in the world, including EXOR, KUNBUS, Unitronics, Matrikon, and mySCADA, providing advanced high-end Industrial 4.0 industrial touch screens, high-end edge computing gateways, IoT development frameworks, PLC and HMI integrated machines, OPC UA, industrial-grade Raspberry Pi, SCADA solutions. All members of the IoT division are professionally trained and certified, with an average of over three years of technical experience, consistently earning excellent customer reputation. We actively participate in industry associations and have made significant contributions to the promotion of advanced technology. To date, Hongke has provided various solutions from hardware to software for numerous users in the industry and has participated in and assisted numerous OEM equipment development and migration projects, as well as smart factory and Industry 4.0 upgrade projects for end users.

Quick Implementation of OPC Data Storage to Database

Quick Implementation of OPC Data Storage to Database

Leave a Comment