Design and Implementation of OPC DA Server
The function of the OPC server is to exchange data with the lower computer, which contains a large number of communication programs and data storage programs. A standard OPC interface is then provided for use by other software. After the standardization of the program, other software vendors only need to develop programs that face the server, and do not need to develop different hardware drivers for different hardware devices. Reduced workload and easy to use. OPC stands for OLE for Process CONtrol, which is a process control standard for automation in the field defined by the OPC Foundation. In fact, OPC stands for a range of standards, including OPC Data Access (OPC Data AccESS), OPC Alarms & Events (Alarms & Events), Historical Data Access (OPC Historical Data Access), and OPC XML-DA (1.0). At present, the OPC standard has been well applied in the field of modern industrial control, especially in data acquisition and soft real-time control. Before the OPC standard was developed, industrial software manufacturers needed to develop separate drive interfaces for different hardware. For technicians developing typical monitor software, about 20%-30% of the time is spent writing communication drivers. When a vendor provides a new piece of hardware, the application developer has to rewrite a new program. The emergence of the OPC standard provides a solution to this problem. It has developed a series of specifications for data access, events, alarms, etc., so that when new hardware emerges, the supplier only needs to provide the implemented OPC standard interface. The upper application software does not need to be rewritten. In this way, seamless communication between the system and the equipment, between the shop floor and the information management, and even further distances, can be achieved through the OPC standard without worrying about the inconvenience and additional cost of the equipment upgrade. OPC sets different standards for different applications. OPC DA is an interface specification for accessing field data based on OLE / COM / DCOM / COM+ technology, using Client / Server mode. The data is obtained from the field device through a specific capture card or serial port, etc., and then the OPC DA server provides the data collected from the data source to the external application in the form of an OPC standard interface, such as industrial control software, real-time database, and the like. The OPC server can serve clients implemented in accordance with the OPC standard in either local or remote service server. This paper introduces the main problems that need to be solved in the design of OPC DA server by using an OPC DA server framework implemented by VC++ programming. In the design of the OPC server, the adapter mode is introduced, and the data access is separated from the specific data source operation through the adaptation layer, so that rapid secondary development is performed for different data sources. To implement an OPC DA server, data is collected from the data source in accordance with the OPC DA standard provided by the OPC Foundation and provided to the outside as a standard-defined interface. Among them, the OPC specification specifies two sets of interface modes for the OPC server: Custom interface and AutomATIon Interface. Among them, the former is the interface that the OPC server must implement, while the latter is provided for the convenience of scripting languages ​​such as VB, which can be selectively implemented. Objects in the OPC DA server According to the OPC standard, in the OPC DA server, there are mainly three levels of objects: server object (Server), group object (Group) and data item (Item). Among them, the server object and the group object are one-to-many relationship, a Server object can contain 0 to more than one Group object, and a group object can contain 0 to more data items. The OPC DA standard provides detailed instructions for the interfaces that the Server and Group objects need to implement. In the OPC DA standard, the data access of the client to the server is in Group. Each time the data item to be accessed is added to a Group, and then the group is read and written as a whole. The Group object adds, deletes, and other related management to the Item through the standard defined IOPCDataMgt interface. The Server object adds, deletes, and so on the Group object through the IOPCServer interface. Structure of the OPC DA server The development of an OPC DA server requires attention to the following issues: how the server operates, the interrelationship between interfaces and objects, the organization of internal data, and access to external data sources. In this example, the framework of the OPC Data Access Server is shown below. High voltage slip ring is also called high voltage slip ring,high voltage resistance slip ring, high voltage collector ring, high voltage convergence ring and so on. High voltage usually refers to the alternating curred by the slip ring, and the voltage to the ground exceeds the conventional 380V AC/DC path. High Voltage Slip Ring,Rotating Electrical Connector Amazon,4 Wire Slip Ring,Collector Ring Assembly Dongguan Oubaibo Technology Co., Ltd. , https://www.sliprob.com