Using Modbus protocol to realize monitoring-level data integration in DCS system

Publisher:Susan苏Latest update time:2006-05-07 Source: 电子技术应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

    Abstract: The Modbus protocol realizes the integration of monitoring data of different operating stations in the cement production raw material system. ATL is used to develop a universal interface component based on the Modbus communication protocol, so that different sites can be easily interconnected. The network topology and implementation methods are introduced, and the integration methods of Modbus and several other protocols such as NetDDE and OPC are compared and discussed.

    Keywords: DCS monitoring data integration Modbus COM

Data integration is key in DCS systems. A typical DCS system can be structurally divided into four levels [1]: field level, control level, monitoring level and management level. This article discusses the monitoring level. There are many parallel substations at this level. Computers are generally used as machine interfaces. Each station can be divided according to function to collect corresponding on-site signals and control some local equipment. However, each site is not isolated. They must cooperate and coordinate with each other to ensure product quality and achieve continuous production, which requires each site to communicate with each other. In addition, the upper-level management network also needs to exchange data with monitoring-level substations to achieve global monitoring and optimization.

However, substations are heterogeneous systems composed of different development platforms and different communication protocols, and may be developed by different manufacturers and individuals. It is cumbersome to write a conversion interface or driver for each protocol, especially when there are many sites and protocols. Therefore, how to effectively integrate data and avoid the emergence of information islands is one of the difficult problems often encountered in DCS systems.

A better method is for each site to use standard protocols for data communication without having to develop a communication interface for each protocol. There are currently many protocols in this area, and Modbus is one of them. 1 Introduction to Modbus protocol

Modbus protocols include ASCII, RTU, PLUS, TCP, etc., and do not specify the physical layer. This protocol defines message structures that controllers can understand and use regardless of the network over which they communicate [2]. The standard Modicon controller uses RS232C to implement serial Modbus. RS232C specifies information such as connector pins, wiring, signal level, baud rate, parity check, etc. On this basis, Modbus's ASC and RTU protocols specify the structure of messages, data, commands and response methods. As shown in Figure 1. Data communication adopts the Maser/Slave method. The Master sends a data request message. After the Slave receives the correct message, it can send data to the Master to respond to the request. The Master can also directly send messages to modify the data on the Slave to achieve bidirectional reading and writing.

Figure 2 is a typical Modbus application example. Modbus can be applied between PIC and PLC that support Modbus protocol, between PLC and personal computer, between computer and calculation, between remote PLC and computer, and between remote computer (connected through Modem). It can be seen that the application of Modbus is quite Extensive. Since Modbus is a de facto industrial standard, many manufacturers' PLC, HMI, and configuration software support Modbus. Moreover, Modbus is an open standard and its protocol content is available for free. Some small manufacturers and even individuals can develop products based on the protocol standard. Products or software that support Modbus so that their products can be connected to the Modbus data network. Therefore, Modbus has a wide application base.

In practical applications, RS232, RS485/422, Modem plus telephone line, or even TCP/IP can be used for networking [3]. Therefore, Modbus has many types of transmission media, which can be selected according to the transmission distance.

2 Specific applications of Modbus

The specific application of Modbus introduced here is the cement raw material production quality control system of a certain factory. There are a total of 5 substations in this system: calcium-iron analyzer, four-element analyzer, material level/slurry plug, batching scale, and distribution warehouse. Each substation consists of a computer and related software and hardware. The control system composition is shown in Figure 3.

As can be seen from Figure 3, the system is basically two control loops: one is composed of a calcium-iron analyzer, a batching scale and a control algorithm to achieve fine preparation before grinding, that is, online real-time closed-loop control of the quality of the raw material being milled; the other is It is composed of a four-element analyzer, a slurry plug, and a material level meter to achieve post-friction blending, that is, homogenization control of the slurry quality before entering the kiln. The library matching algorithm plays the role of control, optimization and network interface in the second loop. Changes in system control parameters are triggered by two events: the results of the calcimeter analysis and the results of the four-element analysis. These two analysis results are obtained from the analysis of actual production samples collected regularly by users. It can also be seen from Figure 3 that the stations are interconnected, and their collaboration is related to the quality of raw material production.

In network design, it is not only necessary to realize data exchange between stations, but also consider the flexibility, versatility, and scalability of the network. For example, the data source site should be able to easily add and delete data, there may be multiple target sites, the data flow should be bidirectional, and all data from the raw material system must be sent to the factory-level DCS, so the network implementation is relatively complex.

Since the Modbus protocol has characteristics such as diversity and reliability, and is an industrial-grade standard protocol, it can be fully suitable for specific applications, so Modbus is used to implement the network.

It is impossible to use source programs to implement Modbus at every site because the application development platforms are different, such as Visual C++, etc., and it is impossible to achieve code reuse. However, the operations of reading and writing Modbus data at each site are the same. To solve this problem, we use COM technology. COM is also a standard for data communication between software modules. The characteristics of COM are language independence, transparency to the schedule and the possibility of binary reuse [4]. Because its interface is open, client programs that support COM technology can call the internal functions of the COM component through its public interface. As we all know, in Windows 2000, COM+ even forms the basis of the operating system.

Finally, two COM components were developed using ATL, namely Modbus Master component and Modbus Slave component. ATL is a framework based on C++ simulation technology. It is mainly used in software development and even COM. Using it can greatly simplify the component development process and improve the efficiency of the code [5]. Both the Master and Slave components include ASCII, RTU, and TCP, and implement the functions specified by Class0 and Class1 [3]. The client program of each substation does not need to understand the specific protocol and implementation of Modbus. It only needs to call the methods exposed by the component to exchange data with the remote computer, achieving transparent Modbus protocol and transparent network data transmission. For example, for components on the Slave side, the client only needs to modify its connection data to make the changes reflected to the Master side. After the Master side modifies the data, the Slave side will trigger an event to notify the client.

The network structure does not use point-to-point connections, but uses star connections to establish a real-time database on a site, which is equivalent to a data center. All sites are only connected to the data center, and data from each site is also sent to the data center for concentration. The network structure is shown in Figure 4.

3 Discussion

3.1 About specific applications

In the network structure shown in Figure 4, on the one hand, the system encapsulates the Modbus protocol and network implementation, realizing function reuse, reducing repeated operations, and making network debugging more convenient; on the other hand, the star structure makes it easier to increase data , It is very convenient to add sites. In principle, each site can obtain the data of any site without adding new connections. Under the network structure shown in Figure 4, the distribution warehouse and the batching scale can be easily connected to realize half-warehouse deployment (control of the batching scale formula based on slurry quality feedback), and increase the number of control loops to three. Some real-time data can also be stored in a historical database for long-term storage and post-analysis query.

3.2 Other characteristics of Modbus protocol

In addition to the widely used features mentioned in the introduction, Modbus has other features. Modbus protocol needs to verify data. In addition to parity check, the serial protocol uses LRC check in ASCII mode and 16-bit CRC in RTU mode. However, there is no additional check in TCP mode because the TCP protocol is a Reliable connection-oriented protocol. In addition, Modbus uses a master-slave mode to regularly send and receive data. In actual use, if a Slave site is disconnected (such as a fault or shutdown), the Master can diagnose it, and when the fault is repaired, the network can be automatically connected again. Therefore, the Modbus protocol has better reliability.

Modbus defines many functions and considers practical industrial applications more comprehensively. Moreover, the protocol is still under development, and users can also customize function codes. It can be seen that the scalability of Modbus is relatively good.

For some repeatedly sent detection data, the Unsolicited method can be used, that is, the Master does not need to send a request, but the Slave takes the initiative to send data. This reduces network data traffic to increase transfer speeds. Therefore, Modbus protocol application is also more flexible.

3.3 Comparison with NetDDE protocol

The NetDDE protocol has several shortcomings: first, the technology is too old, there is no 32-bit API on the Win98 platform, only 16-bit, so it is difficult to implement on a 32-bit platform, and NetDDE cannot realize serial connections; second, data transmission The volume is small, and it is troublesome to transmit batch data; third, the connection cannot be automatically restored after being disconnected. Therefore, NetDDE is not used to implement our network.

3.4 New directions for industrial data integration

OPC is an open industrial specification and standard for data communication between applications. It adopts a client/server system and is based on OLE/COM technology to provide a set of standard interfaces for hardware manufacturers and application software developers [6]. OPC has advanced structure, fast speed and powerful functions, and is the future development direction of industrial data integration. However, OPC is relatively new, has higher requirements for developers, and is more difficult to develop. Moreover, OPC products are relatively expensive and have not yet been popularized in domestic DCS applications. Its promotion and development still need a process.

In short, Modbus has the advantages of openness, wide user range, easy implementation, good scalability, and strong reliability. Therefore, we use Modbus protocol and COM technology to realize the integration of monitoring data, and have achieved relatively good results in connecting with self-developed applications and connecting with DCS systems and HMIs such as FOXBORO, ROSEMOUNT, and CIMPLICITY.

Reference address:Using Modbus protocol to realize monitoring-level data integration in DCS system

Previous article:Development of an online leakage protector tester
Next article:Design of a wide dynamic range intelligent measurement system

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号