A large amount of real-time data exists in the process industries such as chemical plants and refinery in continuous production. These data are basically stored and managed using real-time databases. Everyone knows about relational databases, such as personnel management systems, production scheduling systems, and office automation systems (OA.
In factories and mining enterprises, real-time database data is sometimes stored in relational databases for management systems (such as OA and ERP. Although the real-time database system provides such data exchange modules, it has limited functions and cannot implement some functions as we wish; at the same time, real-time databases are a huge and complex system that is not quite familiar to everyone. Based on years of experience, This article summarizes how to exchange data between real-time databases and relational databases for reference.
Real-time database is a branch of the development of the database system. It is suitable for processing constantly updated and rapidly changing data and transaction processing with time constraints. Currently, common real-time databases that are widely used internationally include infoplus.21 of AspenTech, PI of OSI, and PhD of Honeywell.
Infoplus.21 is a real-time information management system for real-time manufacturing processes. It collects, manages, and stores large amounts of process data. Process data can be presented to users in real time, so that users can apply the data to improve production methods, increase profits, and improve the flexibility of transaction processing.
This article provides three methods for exchanging infoplus.21 and relational databases. You can select one method based on your actual application.
(1) Aspen LIMS interface: This is an interface software provided by Aspen for infoplus.21 and LIMS (Laboratory Information Management System). This module can also be used for data exchange.
(2) Desktop ODBC: This is a desktop ODBC module that enables your desktop applications, such as Microsoft Excel, Microsoft Access, Crystal Report, and Microsoft Visual Basic, to query data in real-time databases. [1] [2]
(3) API: This is a set of programming interfaces developed for infoplus.21. You can use APIs to implement more functions and make the data exchange method more free.
Example 1: Use APIs for data exchangeCode[1] [3]
# Include "infoplus21_api.h"
// Connect to the infoplus21 Database
If (! Inisetc ())
{
Afxmessagebox ("infoplus.21 connection failed! ", Mb_iconinformation );
Return;
}
// Write historical data
Whis21dat (whis_type_update, ntagid, ft_ip_area_of_trend, num_fts, nfts, ndts, pdvs,-1, & xhistime, & nftsok, & ERR );
// Read data
Float pvalue;
Db2real (recid, ft_ip_input_value, & pvalue, & ERR );
// End the connection to the server
Endsetc ();
The data exchange method mentioned above can be reasonably selected based on the software functions and the difficulty of software development. This section does not describe how to develop relational databases. For more information, see.
The above method can be used to develop a software system meeting the data exchange needs of real-time databases and relational databases, so that the applications of these two databases are further deepened, it provides methods and means for enterprises to fully integrate data.