ABSTRACT
OPC (OLE for Process Control) is a kind of general criterion of industrial control.
It’s a standard protocol of interface which is made by the one-up automatism software
and hardware corporations in the world. Because the drivers of devices can’t be shared
each other, the OPC technology is put forward to solve the problem and let the
applications can communicate with all the devices. It separates the development of
software applications from the hardware device providers. The two separated parts
perform their respective roles and advance their working efficiency with the OPC
technology as a middle component. The OPC technology optimizes the classic industrial
control system in the whole with the situation of poor compatibility and low efficiency
in data transmission, and improves the system integration further. It represents the main
development aspect of the process control system in the future.
This paper mainly develops a reusable OPC DA Server to access the bottom
hardware through researching the OPC Data Access Specification, and provides the data
in the way of OPC interfaces to the application software which support the OPC
specification so as to let the Clients access the different devices with a uniform data
access criterion and make the system integrate conveniently.
COM (Component Object Model) is the basis of developing the OPC DA Server.
According to the principles of the COM technology, this paper researches the methods
of creating, realizing and registering the COM object, and discusses the development
principles and realization process of the OPC DA Server which base on the COM
technology in detail. The paper also puts forward to the software structure of the OPC
DA Server and the hiberarchy of the objects, and offers the realization methods of the
main interfaces of each object. Through researching the communication mechanism of
the OPC, this paper sets forth two different asynchronous data exchange mechanisms
mainly with the data message and the connection point as the internal technologies in
the OPC DA Specification and realize them.
According to the problems got in practice, this paper describes the events need to
be noticed in the realization process. Considering the compatibility of the OPC DA
Server, the asynchronous data exchange interfaces of OPC 1.0 and OPC 2.0 are realized
at one time. This paper analyzes the working principles and the operations of the
callback functions of them and achieves the bidirectional communication between the
OPC DA Server and Client.
At last, this paper uses the standard OPC Clients to test the whole realization
situation of the OPC DA Server, and evaluates the test results of the objects
management, synchronous and asynchronous data exchange with the OPC DA
Specification.
Key Words: OPC Server, industrial control criterion, middle