Optimizing OPC Connection with the OPC DataHub

Case Study

Mukhaizna Oil Field - Oman

In 2005 the Sultanate of Oman issued a Royal Decree to develop the giant Mukhaizna oil field covering a vast expanse of desert in the center and south of the country. A major worldwide producer of oil, natural gas, and chemicals was given responsibility for developing the Mukhaizna field, and from 2005 to 2008 oil recovery rates were increased by more than 600% through the use of a steam-assisted gravity drainage process. As each year goes by, the company makes every effort to continuously upgrade technology and improve productivity of the field.

Eight separate production facilities in the Mukhaizna oil field are using Rockwell PLCs, linked to Iconics HMI/SCADA systems for data visualization and operator control. This data collection and distribution mechanism worked well when first implemented, but as the number of data points increased over time it became clear to the project engineers that they needed a way to improve performance. So they began to look for a way to streamline the data flow. The solution they found not only performed well, but it created other, significant opportunities for real-time data integration.

At each of the eight locations, Rockwell PLCs are connected to an Iconics Genesis32 HMI through an OPC server. The TOP Server OPC server from Software Toolbox gathers data from as many as 20 PLCs, and feeds that to the HMI. As new equipment was brought online, the number of tags in the system approached 30,000, which is normally not a problem for TOP Server. But something was clearly different with this system and it became apparent that some sort of optimization was necessary.

The problem was that the HMI was forcing the TOP Server to make device reads, which bypassed TOP Server’s optimization at the device level. Device reads by an OPC client are intended to cause the OPC server to get the information and reply back to the OPC client before doing anything else. While these types of calls are useful in critical situations, all communication optimization has to be done through full system design. The HMI was also requesting updates on groups of OPC tags as it needed them, but these groups were often in a different logical order than how the data points were represented on the PLC. The combined effect was forcing the TOP Server to make more requests for smaller amounts of data, slowing the data-gathering process.

“The OPC server seemed to be dying under the load,” said Juan Munoz, Project Manager for the Mukhaizna oil field project. “Even at rates as low as once per second, it was difficult to scan 30,000 tags, and get the critical data changes that we needed.” Based on his experience with the TOP Server in other projects, Mr. Munoz knew the server itself was not the issue, so he searched the Software Toolbox website for a solution and found the OPC DataHub.

The OPC DataHub, developed by Cogent Real-Time Systems, is a highly optimized data integration tool. It is a memory resident real-time database that provides quick, reliable and secure access to valuable process data and makes it available to other production and management systems, database archives, and remote clients.

Once he started configuring the OPC DataHub, Mr. Munoz soon realized how it could solve his data flow problem. Acting as an OPC client to TOP Server, the OPC DataHub can request data based on tag value changes (referred to as “asynchronous advise”). This means that instead of 30,000 tags per second, TOP Server only sends data for a tag when it changes value. It is free to poll the devices in the most efficient way, always keeping the OPC DataHub up to date with the latest data values. The OPC DataHub keeps all the latest tag values in memory, and can efficiently send them to the HMI on each poll.


Info Graphic - Basic OPC Architecture

“The OPC DataHub effectively decouples the OPC server from the client,” said Mr. Munoz. “All the load is on the DataHub's shoulders now, and the performance is much better.” The TOP Server is now free to optimize the communications to the device while the OPC Data Hub protects it from device reads. This has relieved the company from having to redesign their HMI and PLC configurations from the ground up, saving them tens of thousands of dollars in engineering and development work.

When he was satisfied with the results at the first location, Mr. Munoz began installing the OPC DataHub at the seven other facilities. He experienced a similar performance boost, and at the same time created a new data integration opportunity. He now had most of the pieces in place to bring all of the live production data to a central location, using OPC tunnelling.

OPC tunnelling is a reliable and secure way to connect OPC servers and clients over a network. OPC uses DCOM for networking, which is difficult to configure, does not respond well to network breaks, and can pose significant security risks. The OPC DataHub mirrors data from OPC servers and clients over TCP, which is a more robust protocol for networking.

To implement OPC tunnelling, Mr. Munoz installed another OPC DataHub on a Windows server at the Mukhaizna oil field central office. After configuring tunnelling connections between that DataHub and the remote DataHubs, he was able to access the data from all eight field locations as a single, common data set, without putting any more load on his control system. This data could now be logged and shared at the management level of the company.

Info Graphic - Aggregation Architecture

Using the OPC DataHub’s data logging interface, Mr. Munoz configured connections to OSIsoft PI and SQL Server databases, to record production data at the remote sites and at the central office. Historical records and reports are now available through standard tools such as SQL and Crystal Reports. Mr. Munoz also configured an OPC connection from the central OPC DataHub to an Iconics Web HMI to give managers access to the live data from all of the eight field sites. Operators, on the other hand, continue to control the processes from the HMIs running at the remote locations.

Among the critical information that operators and management need to monitor is the available memory and status of programs running at each field location. The company was able to achieve this by configuring the OPC DataHub's System Monitor feature, which allowed Mr. Munoz to add points that monitor the available computer memory and status of the OPC server running at each remote location. This data is accessed locally by operators, and is also tunnelled back to the central OPC DataHub, so it can be viewed by users of the Web HMI on the management network.

“The OPC DataHub is very easy to use,” said Mr. Munoz. “In fact, at a recent training session we showed some other people at the company what we are doing, and they are very impressed.”

Info Graphic - Redundancy Architecture

The most recent project that Mr. Munoz has decided to tackle with the OPC DataHub is to implement redundancy. To provide increased availability, the company has installed an additional OPC server at some locations. Working with Win Worrall, Product Support Engineer and Developer at Software Toolbox, Mr. Munoz has implemented a DataHub script that monitors the quality of the data coming from the local OPC server.

If the quality of an indicator changes to “Bad” or “Not Connected” on the primary OPC server, the OPC DataHub immediately switches to the redundant OPC server and continues collecting data from there. Although this is still undergoing testing before being implemented in the production facility, Mr. Munoz reports that there is no data loss during the switchover, and that the performance is very reliable.

Having gained some knowledge of scripting, Mr. Munoz has applied it to yet another application for the OPC DataHub. “The scripting language did take a little time to learn, but it is very useful for the types of scripts we need to use. We can develop scripts quickly now, because the language is object oriented.”

Info Graphic - Unix Architecture

Starting with a demo script from the OPC DataHub archive, Mr. Munoz has been able to access data from a legacy UNIX system and make it available through OPC. To access the data, Mr. Munoz wrote a DataHub script to read a CSV file every minute and write the values to points in the OPC DataHub. Because the OPC DataHub is also an OPC server, this allows points from the UNIX system to be presented as OPC tags to the HMI system.

“I am impressed with how quickly Juan has picked up the scripting,” said Mr. Worrall. “In fact, he's pretty good at getting the most out of the OPC DataHub in just about every way.”

“We are very grateful to Win and the overall support from Software Toolbox on this project,” said Mr. Munoz. “We haven’t found many problems. In all aspects, the OPC DataHub is performing very well.”

OPC DataHub is a trademark of Cogent Real Time Systems.  Software Toolbox is a trademark of Software Toolbox, Inc.

Try It Yourself - How-To Video and DataHub Free Trial