In the petrochemical industry production, advanced process control and real time optimization can bring along great economic benefits. And the application of advanced process control and real time optimization needs mechanism modeling configuration.For above requirement, this subject brings an idea that implementing mechanism modeling configuration, gives a design of process model software configuration and develops a mechanism modeling configuration software for petrochemical industry by Visual C++ 6.0. This configuration software includes four model parts. They are process graphic library software, process control flow chart configuration software, mechanism modeling configuration software and OPC client. In this subject, framework of configuration software is firstly made by the application of object-oriented methodology and design patterns in configuration software. After that, the object-oriented model is applied to build system model of configuration software. Then, the graphic library software and configuration software of process control flow chart are developed according to the model. Based on developed mechanism modeling configuration software above and OPC technology, OPC client is developed, which is embedded in the configuration software. At the same time, applying branch recursion of doubly linked list technology and serialize technology of MFC, combining, splitting for basic graph and storing typical process unit equipment symbolic graphs for petrochemical industry into the graphic library. By the concept of graphic layer, the function of putting graph on up layer or down layer is realized. Abundant function of graphic edition, such as graphs of picking, moving, resizing, copying, cutting, pasting deleting etc., is provided. Using double buffer technology the problem of painting interface blink and efficiency of graph plotting are improved. Two methods of dynamic link between the process mechanism models and the graphs are given, which are DLL hot interlink and variant linkage, and elementary function of variant definition is provided.The software developed in this paper is tested, and the results of test show that the functions for the configuration software are efficient and the design function has basically realized. |