Application of OPC Technology in Monitoring System

xiaoxiao2021-03-06  42

0 Preface

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 direction, and computer monitoring system software has also mainly facing functional systems, with object-oriented Technology, distributed object calculation, multi-level Client / Server technology matures, developed to object-oriented computer monitoring systems for specific field devices.

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.

1 OPC introduction

1.1 OPC concept and technical advantages

OPC (OLE for Process Control) is an OLE technology designed for process control. It is established by some world occupation of automation systems and hardware, software companies and Microsoft, and the OPC Foundation is responsible for the development of OPC specification. And release. 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.

OPC technology has the following advantages compared to traditional ways:

a. Hardware manufacturers are familiar with their hardware devices, so the device driver performance is more reliable and efficient.

b. Software vendors can reduce the development cycle of complex device drivers, only a set of procedures that follow the OPC standards can implement communication with hardware devices, and can put human and material resources into system function.

c. Interoperability of hardware and hardware can be achieved.

OPC has separated hardware and software manufacturers, making it a lot of improvement in the work efficiency of both parties, so

OPC technology has been supported by hardware and software manufacturers and develops rapidly. National Power Company Power Automation Research Institute automatically controls the EC2000 computer monitoring system software for providing OPC Server to fully support.

1.2 OPC technology essence --com / DCOM

With the development of computer network technology, computer monitoring systems are generally distributed, so the systemic isomer is a very significant feature. OPC technology is the use of Microsoft COM / DCOM (Component Object Model / Distributed Component Object Model) technology, COM mainly provides unified, expandable, expandable, expandable, expandable, expandable for Windows-based programs Object-oriented communication protocols, DCOM is an extension of COM technology in the field of distributed computing, so that COM supports communication between the LAN, WAN, and even the objects of different computers on the Internet.

1.3 OPC specification

Based on COM / DCOM technology adopts customer / server structure, providing a public data exchange criteria and specification for each manufacturer, 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 driver

sequence.

The OPC specification 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 1. Figure 1: OPC Client / OPC Server Relationship

2 OPC server composition

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

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 2: Server / Group / ITEM relationship

3 OPC Client Application

3.1 OPC interface

OPC specification has two interface modes: custom interface (Custom Interface) and Automation Interface

Automation Interface. Custom interface is a set of COM interfaces, primarily used to develop applications for C languages; automated interfaces are automated OLE interfaces, mainly used to develop scripting-based programming-based applications based on VB, Delphi.

Figure 3: OPC server communication method for two interfaces

Automation interface

Custom interface

C

Client program

VB

Client program

OPC server (local, internal, remote)

image 3

OPC server communication method for two interfaces

For the development of the client application, the operation efficiency is high in the way, but the development is difficult; the operation is low in operation with the automation interface, but the development is simple. Communication with the two interfaces and the OPC server is shown in Figure 3.

For the development of the OPC client on the distributed object, the OPC standard uses DCOM technology to implement the server and the client's communication.

3.2 Access the OPC server for data interaction

As can be seen from Figure 2, the OPC server can be divided into three-layer structure, Server, Group, and Item.

When actually accessing the OPC server, the first step is to complete the initialization of the COM library, then create a server object, establish a connection with the server, get the interface of the server object; second step to add a group object, and set the data refresh rate, Dead zone and other parameters; the third step adds data item objects, data item objects include read only, write other properties, can set the properties according to actual needs.

OPC customers and OPC servers have two types of access methods: synchronous and asynchronous way.

Synchronous mode is more simple, the customer issues a read-write request to the server, then waits for the server to return information, when the customer data is less, it can be used when the amount of data interacts with the server is less, however, when the network is blocked or a large number of customer access When it causes the performance efficiency of the system to decline.

After the asynchronous manner is more complicated, the client immediately returns the information to the server, the server immediately returns the information indicating that the request is accepted, the customer can do other processing, when the server completes the read and write operation, inform the callback function, notify the client operation to complete, and Pass the corresponding information, so the asynchronous mode is more efficient, avoiding the blocking of multi-client data requests and saves CPU and network resources to maximize CPU and network resources. Another asynchronous manner is data from the server periodically scan buffer, and it is found that the data variation ranges more than the dead zone, immediately notifies the client program, pass the corresponding information.

3.3 Application Examples

Ethernet

Serial port

SLC500

Industrial computer

RSLINX OPC Server

Hardware driver

Data buffer

OPC interface

OPC client

EC2000 Software

Upper machine system

Figure 4: SLC500 communication system structure based on OPC technology

Zhejiang Changtan Hydropower Station computer monitoring system uses the national power company Electric Power Automation Research Institute to automatically control the development

EC2000

Computer monitoring system, from the host computer system, three sets of units

LCU

And a common

LCU

Composed by Ethernet connection, the host computer system is adopted

EC2000

Monitoring software, unit

LCU

Common

LCU

Take industrial computer

PLC

Mode,

PLC

use

Rockwell

(Rockwell)

company's

SLC500

(Serial port) type

PLC

And use

Rockwell

company's

Rslinx

Communication Software.

RSLINX Communication Software supports the latest OPC technology, providing an OPC server that meets the OPC specification, which is connected to the SLC500 after simple configuration. The local industrial computer monitoring software adopts OPC technology (custom interface and asynchronous mode), accessing the RSLinx OPC Server included with the OPC client, implements communication with the SLC500. The system structure is shown in Figure 4.

In other projects, OPC technology has been used to realize SLC500 (Ethernet) PLC, Control Logix Series PLC (Ethernet), SIMENS, SIMENS, SIMENS, SIMENS, SIMENS. Applied in computer monitoring systems such as Gate, Hunan Hongjiang Power Plant, Hunan Hongjiang Power Plant.

4 Conclusion

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

New Post(0)