| The OPC (OLE for Process Control) is an industrial Control software interface standards formulated by OPC foundation. It adopts Microsoft's COM/DCOM technology as its foundation, and the client/server as its architecture, thus defines a set of standard data access interface for industrial control software. Through these interfaces, application software can be seamless integrated. Thus, the standardized data exchange is achieved and the interoperability of industrial control system is improved.OPC technology adopts the client/server as its architecture, and divides industrial control software into two parts which are OPC client and OPC server: Hardware device drivers are packaged into part which can independently operating, it is called OPC server; The upper applications are OPC client, they can get data from any hardware devices as long as they follow OPC interface standard, thus can configure system flexibly and achieve integration of multiple systems seamlessly.On the basis of the study of COM technology and the OPC specification, the development of OPC Server and its application are studied. The work of the paper mainly includes the following aspects:1. The OPC data access server is developed based on Modbus protocol. First, the function module and overall achieving process are analyzed on the whole, the data structure and thread model of the OPC server are designed. Then, the achievements of the two standard OPCServer and OPCGroup COM objects and their interface functions are analyzed. The detailed key codes and achieving process are given. Finally, combine with actual need, the serial driver of the Modbus protocol is encapsulated in the form of dynamic link library.2. The OPC client application software is programmed. The development process and the main steps of the OPC automation client program is discussed, and the detail codes of the OPC are programmed on the VB platform which lays the foundation for development of the monitoring software based on OPC technology.3. The test of OPC client and server. The interoperate test of OPC client and server programmed in the paper, which consists of local and remote communication test, is carried out. The test result verifies the reliability of the OPC technology which supports multi-client access and the remote communication4. Practical application of the OPC technology. After the OPC client and server have been programmed, the OPC technology is applied in the monitoring system of main fans in mine. The host computer software which has full function is developed. The data sharing and remote monitoring are achieved and the openness and extendibility are improved. |