Communication driver for dual network redundancy system with OPC technology

xiaoxiao2021-03-06  39

Shandong Shizheng Power Plant Huang Hao Shui Electric Automation Research Institute Division 1 Introduction With the rapid development of new technologies in computer science and technology, industrial control, computer monitoring system has developed from early centralized monitoring to all distributed directions. Computer monitoring system software also develops from earlier-oriented systems, with object-oriented technologies, distributed objects, multi-level Client / Server technology, developed to object-oriented computer monitoring systems for specific field devices. Computer monitoring system. At the same time, computer monitoring system is growing, and the types of field equipment produced by different manufacturers are constantly increasing. Due to the communication mechanism of the field equipment provided by different manufacturers, the computer monitoring system software needs to develop equipment communication drivers. There is also more and more, and OPC technology based on COM / DCOM technology provides a unified standard. Different vendors can implement hardware and software interoperability as long as they follow the OPC technical standards. There are currently many monitoring software to support OPC technology. The application of the computer monitoring system of a hydropower plant in a water power plant computer monitoring system in this paper takes the redundancy implementation of the dual Ethernet based on OPC Access. 2 Structure and function of dual network system

The system structure is as follows:

Figure 1: Dual network system structure

The hydropower plant has two hydropower generators, a set of public equipment.

The entire system adopts dual Ethernet redundancy design, the host computer system uses the software EC2000 developed by Nanrui Autonomous Company, using dual network card industrial control computers as an operator station, with two industrial control switches, two hydropower unit control and The control of public equipment uses the Control Logix PLC of the Double CPU and Dual NIC. The system structure is shown in Figure 1.

Functional requirements:

(1) Monitoring and control functions of conventional single network systems.

(2) The PLC master CPU is broken and automatically switched to the communication from the CPU.

(3) The PLC main Ethernet card is bad, the main network line is broken, and automatically switches to the Ethernet card communication.

(4) The main switch is broken and automatically switched to the switch communication.

(5) The operator station main network card is broken and automatically switches to the network card communication.

3 OPC-based communication software development and implementation

3.1 OPC Introduction OPC (OLE for Process Control) is an OLE technology designed for process control, and is established by some world occupying automation systems and hardware, software companies, and Microsoft, OPC Foundation. Responsible for the development and release of the OPC specification. OPC proposes a unified standard that uses Client / Server mode, which is completed by hardware devices or special companies, providing a Server program with unified OPC interface, software vendor accessing Server programs in accordance with OPC standards, Communication with hardware devices. 3.2 OPC specification

Based on COM / DCOM technology uses a Client / Server structure, providing various manufacturers with a public data exchange standards and specifications, each hardware device manufacturer provides a server that meets the OPC specification interface, and other applications passed the OPC interface. OPC server access to the hardware device read and write, and this software developer only needs to develop a set of OPC Client programs without having to understand the communication protocols of each hardware device, and do not need to write hundreds of hardware devices in the market. Specialized drivers. The detailed OPC specification can be downloaded to the OPC Foundation website. OPC mainly includes two parts: OPC Server (Server) and OPC Applications (Client). One of the OPC Client can connect one or more OPC servers, while multiple OPC Client can also connect an OPC server at the same time, as shown in Figure 2.

Figure 2: OPC Client / OPC Server Relationship

3.3 OPC server composition

The OPC server consists of three types of objects: Server, Group, and Data Items (Item).

Server object saves server and server as all information of the OPC group object container.

The OPC group object saves the information of the group object and provides the mechanism for organizing an OPC data item. OPC group objects provide customers with a way to organize data. For example, a group may represent a data item for a special device. The OPC Client can read and write data through group objects and set the OPC server to provide the data update rate of the OPC Client. The OPC specification defines two groups of objects: public groups and private groups. The public group is shared by multiple customers, and the partial group is only part of an OPC customer. The global group is valid for all applications where the server is connected, and the private group can only be valid for the establishment of his client. In a server, there are several groups.

The OPC data item represents the data source connection of the OPC server, not a data source, the data item is the minimum logical unit of reading and writing data (in practical applications, it may be a source of the physical device register or register), the data item is not Provide an external interface, you cannot use an OPC Client access as a separate object, which must be part of a group. All access to the OPC data item must pass the group object containing the OPC data item, that is, you must pass the OPC data item. . In a group object, the customer can join multiple OPC data items. Each data item includes 3 variables: value (Quality), Quality and Time Stamp. The data value is expressed in the form of Variant.

Figure 3: Server / Group / ITEM relationship

3.4 Design thinking and implementation

The basic idea of ​​design: Using OPC technology, access the RSLINX OPC Server server through the OPC specification, implements communication with the PLC, and achieve redundant systems through different groups, because the amount of data is large, in order to improve the refresh rate. The principle of a communication program for each set of PLCs. (RSLINX OPC Server provides standard OPC interfaces for Rockwell, providing standard OPC interfaces). By adopting OPC technology, developers do not need to understand the low-level communication protocol of Rockwell's PLC, regardless of the PLC use Ethernet or other network, as long as it is configured in RSLINX, only programs that meet the OPC specification can be communicated. Therefore, it greatly improves the development efficiency.

By analyzing system structure and function, the operator station and PLC communication have the following four channels:

1, operator station main network card main CPU main network card

2, the operator station main network card main CPU from the network card 3, operator station from NIC from CPU main network card

4, operator station from NIC from the CPU

Therefore, in the access to RSLINX OPC Server, you need to establish four groups for communication efficiency, any

The moment is guaranteed that only one group is active. Switches depending on the situation of failure. The program structure is as follows (specific code omit):

(1) Create an OPC Server object.

(2) Add group1 object.

(3) Add ITEM.

(4) Repeat (2) and (3) three times, add three new Group objects, named Group2, Group3, Group4, and add the corresponding Item.

(5) Get the Group1 object interface, set the group1 object to active, and set other Group objects as non-active.

(6) Timed query of Group1 quality, if the quality is bad, it indicates that the first channel has failed, obtain the Group2 object interface, set the group2 object to act, query group2 quality, if the quality is good, the channel 2 is not faulty. As the main channel communication with this channel, if the quality is bad, then push until group4 (channel 4). The alarm is detected on the operator station while detecting a channel fault.

(7) When the system exits, delete item, delete the group object, delete the OPC Server object, and the program exits.

4 Conclusion

Through the methods described in this article, it is easy to achieve communication of redundant systems, and actual applications in the hydrocomputer computer monitoring system. In addition to the dual network communication this time, OPC technology-based single-Ethernet communication has also been applied to many lives. From communication development, OPC technology is used, do not understand the low-level communication protocol, which greatly reduces the workload of developers and improves work efficiency. Therefore, this paper has a certain role in the design and development of the system of the same type of scheme. For details, please refer to the photo album OPC technology!

转载请注明原文地址:https://www.9cbs.com/read-72423.html

New Post(0)