Communication optimization method, device and application between HART protocol and host computer software

Through the HART protocol to ModbusTCP protocol gateway device, the HART protocol and the Modbus protocol are combined to solve the problems of low data transmission accuracy and high communication cost in the existing technology, and a high-precision and low-cost communication solution is realized.

CN115988097BActive Publication Date: 2025-03-21TIANJIN TAIDA TAP WATER
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211547380.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2025-03-21
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

The prior art failed to combine the HART protocol with the Modbus protocol, resulting in low data transmission accuracy in communications and more hardware facilities are required to be invested in communication devices, increasing communication costs.

Method used

Through the HART protocol to ModbusTCP protocol gateway hardware device, the communication between the HART protocol and the host computer software is optimized. This method does not require rewiring, and uses the original analog signal line to realize data transmission, reducing the demand for cables and labor, and converts the HART protocol data format into the Modbus protocol data format through the gateway device, so that the upper computer software can directly read the data.

Benefits of technology

It realizes the precise transmission of HART protocol data, reduces communication costs, simplifies the hardware wiring process, and improves the signal quality of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988097B_ABST
    Figure CN115988097B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of communication information processing technology, and discloses a method, device and application for optimizing communication between the HART protocol and the host computer software. The method comprises: inputting the network parameters of the HART protocol to ModbusTCP protocol gateway, changing the address of the HART protocol to ModbusTCP protocol gateway to the network segment where the terminal device is located, and at the same time defaulting the service port used by the ModbusTCP protocol to a digital identifier that can identify the signal transmission of the field device; inputting the set Modbus parameters, determining the high and low bytes of the data type in the Modbus communication format; the terminal device reads the data detected by the field device in real time, and displays it on the screen. The host computer end of the present invention only needs to add a gateway for converting the HART protocol to the ModbusTCP protocol, so that the problem of the communication protocol hardware is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of communication information processing, and in particular relates to a method, device and application for optimizing communication between a HART protocol and host computer software. Background Art

[0002] With the continuous development of various communication protocols, field instruments basically have a variety of communication methods for users to choose from. Of course, the three most widely used methods are: analog transmission, Modbus protocol transmission, and HART protocol transmission.

[0003] Analog transmission uses 4-20mA current signals for data transmission. The data is highly real-time, but the current signal is easily interfered by high-frequency signals. After the analog signal is transmitted, it needs to be proportionally converted by PLC programming to get the result. The data can only be displayed approximately and cannot be consistent with the on-site instrument display.

[0004] Modbus protocol transmission is the most common application. It has high transmission efficiency, fast transmission speed, is not affected by signal interference, has high data accuracy, and can ensure that the host computer display is consistent with the on-site instrument data. It is a very good communication method.

[0005] The HART protocol is similar to the Modbus protocol. It has many advantages of the Modbus protocol, but the two are different in the actual wiring method on site. First of all, the wiring method of both adopts a two-wire system, which is their similarity. The difference is that the two-wire system of the Modbus protocol can only transmit the Modbus protocol, while the two-wire system of the HART protocol can not only transmit the HART protocol, but also transmit 4-20mA analog signals. In simple terms, these two communication data lines can transmit both analog signals and HART protocol signals, and the two coexist without interfering with each other. Therefore, in some existing technical purpose modifications, if you want to use the Modbus protocol for data transmission, you must re-insert a two-core cable to the field instrument, otherwise you cannot use the Modbus protocol for transmission.

[0006] Furthermore, the HART protocol is an open communication protocol for addressable remote sensor high-speed channels. It was launched by the American company ROSEMOUNT in 1985 as a communication protocol for field intelligent instruments and control room equipment. It is widely used in the communication protocols of various brands of flow meters. Its advantages are good communication quality and fast communication speed. At present, the signal transmission of flow meters in many industrial controls mostly adopts the analog 4-20mA transmission method. Although the wiring is simple, the data accuracy can only be displayed approximately. This is determined by the working principle of the PLC analog working module. The working principle of the analog module is essentially a D / A conversion (digital signal conversion analog signal) chip, which converts the 4-20mA analog signal into an electrical signal, and then performs proportional conversion in the PLC (Programmable Logic Controller) program, and outputs the converted result for display. Due to the proportional conversion, there is still an error between the displayed result and the actual value on site. The error can be very small, but it still exists.

[0007] The HART protocol can solve this problem. It can accurately transmit field data to the host computer for result display. The data seen by the monitoring personnel is consistent with the field data. Although the HART protocol has many advantages, most host computer software cannot directly read the HART protocol. The HART protocol lacks an independent driver in the host computer software, which is one of the reasons why the HART protocol is not widely used.

[0008] Modbus protocol can be said to be the most widely used communication protocol in the field of industrial automation, because its openness, scalability and standardization make it a universal industrial standard. With it, products from different manufacturers can be easily and reliably connected to the network to achieve centralized monitoring and decentralized control functions of the system. Commonly used host computer software such as WinCC, IFIX (automation monitoring configuration software), Force Control, Kingview, Intouch and other software all support Modbus protocol, all have Modbus protocol drivers, and can directly receive Modbus protocol data for output display.

[0009] In summary, the HART protocol and the Modbus protocol can be combined to give full play to their respective advantages, perfectly solve the difficulties of the data channel, and achieve accurate data transmission.

[0010] Through the above analysis, the problems and defects of the existing technology are: However, the existing technology does not combine the HART protocol with the Modbus protocol to give full play to their respective advantages and perfectly solve the difficulties of the data channel, resulting in low data transmission accuracy in communication.

[0011] Moreover, in the existing technology, in order to meet the communication needs, more hardware facilities need to be invested in communication equipment, resulting in increased communication costs. Summary of the invention

[0012] To overcome the problems existing in the related art, the disclosed embodiments of the present invention provide a method, device and application for optimizing communication between the HART protocol (Highway Addressable Remote Transducer, an open communication protocol for addressable remote sensor highway channels) and host computer software.

[0013] The technical solution is as follows: A method for optimizing communication between the HART protocol and the host computer software includes two aspects: The first point is the hardware aspect: the accuracy of HART protocol data transmission is better than the traditional analog transmission method, the wiring is simple and convenient, and there is no need to rewire. On the basis of not affecting the original transmission method, the communication between the HART instrument and the host computer can be realized with the help of the original cable, and the data transmission is not easily interfered by strong electric signals, and the signal quality is better than the traditional analog transmission method. The second point is the software aspect: if the host computer needs to directly read the data format of the HART protocol, then it is necessary to use computer languages ​​such as C language (a process-oriented computer programming language) or Python language (an object-oriented programming computer language) for program development. The purpose of developing the software is to convert the data format of the HART protocol into the data format of the Modbus protocol, because the mainstream host computer software on the market, such as WinCC, Intouch, Kingview, IFix, etc., do not support direct reading of the data format of the HART protocol. However, after the gateway device module converts the HART protocol data format into the Modbus protocol data format, the host computer software can directly read the data, saving the development cost of the computer program, making it more convenient and faster, and making future use and maintenance simpler and more convenient.

[0014] The specific steps include:

[0015] S1, input the network parameters of the HART protocol to ModbusTCP protocol (Modbus protocol, serial communication protocol) gateway, including the IP address (Internet Protocol Address), subnet mask and remote port number, use the configuration software corresponding to the gateway device to configure the relevant network parameters, change the address of the HART protocol to ModbusTCP protocol gateway to the network segment where the terminal device is located, and set the service port used by the ModbusTCP protocol to a digital identifier that can identify the signal transmission of the field device by default;

[0016] S2, input the set Modbus parameters and determine the high and low bytes of the data type in the Modbus communication format;

[0017] S3, after the implementation of steps S1 and S2, the terminal device reads the data detected by the on-site equipment in real time and displays it on the screen.

[0018] In one embodiment, before inputting the network parameters of the HART protocol to ModbusTCP protocol gateway in step S1, the following operations are required:

[0019] (1) Field devices supporting the HART protocol are connected to the HART protocol to ModbusTCP protocol gateway device through a two-core cable;

[0020] (2) The HART protocol to ModbusTCP protocol gateway device is connected to the Ethernet switch and terminal device via Ethernet.

[0021] In one embodiment, in step (1), the field device supporting the HART protocol is connected in series with a HART protocol to ModbusTCP protocol gateway device through an analog quantity acquisition module on the basis of the original analog quantity signal line;

[0022] In step (2), the terminal device directly reads the field device data for the host computer, or uses the PLC to collect the field device data for logical operations and programming.

[0023] In one embodiment, in step S3, after the implementation of step S1 and step S2, the terminal device reads the data detected by the field device in real time, and displays the data on the screen, including the following steps:

[0024] Step 1, add a communication driver, set the communication driver parameters, and create a new communication channel;

[0025] Step 2: Create a new variable in the newly created communication channel and fill in the variable's data type and address;

[0026] Step 3: Create a new screen, connect variables, and run the screen to test the correctness of the data.

[0027] In one embodiment, the terminal device uses WinCC (SIMATIC WinCC, WinCC is the human-machine interface component in the SIMATIC PCS 7 process control system and other Siemens control systems) and Intouch (Wonderware InTouchfor FactorySuite, an industrial automation configuration software from Wonderware) software to read the data detected by the field equipment in real time and display it on the screen.

[0028] Another object of the present invention is to provide a device for optimizing communication between the HART protocol and the upper computer software, including an instrument supporting the HART protocol for collecting field data, which is connected to a HART protocol to ModbusTCP protocol gateway device via a two-core cable; the HART protocol to ModbusTCP protocol gateway device is connected to an Ethernet switch and a terminal device via Ethernet.

[0029] Another object of the present invention is to provide a storage medium for receiving user input programs, wherein the stored computer program enables an electronic device to execute the HART protocol and the communication optimization method between the upper computer software.

[0030] Another object of the present invention is to provide a computer device, wherein the computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the communication optimization method between the HART protocol and the host computer software.

[0031] Another object of the present invention is to provide a water supply pressure detection station, which implements the communication optimization method between the HART protocol and the host computer software, and performs communication between the HART protocol and the host computer software and screen display.

[0032] Another object of the present invention is to provide a sewage and wastewater discharge index detection station, which implements the communication optimization method between the HART protocol and the host computer software, and performs communication between the HART protocol and the host computer software and screen display.

[0033] Combining all the above technical solutions, the advantages and positive effects of the present invention are as follows:

[0034] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving the problems, the technical solutions to be protected by the present invention and the results and data during the research and development process are closely combined to analyze in detail and deeply how the technical solutions of the present invention solve the technical problems, and some creative technical effects brought about after solving the problems, which are specifically described as follows:

[0035] The present invention utilizes a HART protocol to ModbusTCP protocol gateway hardware device to optimize the communication between the HART protocol and the host computer software.

[0036] The present invention adopts HART protocol for data transmission, which does not require rewiring, saves cables and labor, shortens the construction period, and can realize data transmission with the help of analog signal lines. The field instrument does not need to make any hardware changes, and only needs to set the HART protocol parameters of the instrument. The host computer end only needs to add a gateway for converting the HART protocol to the ModbusTCP protocol, which solves the conversion problem between the communication protocol data formats. The data format is converted from the HART protocol format of the instrument end to the Modbus data format that can be directly read by the host computer, eliminating the time and cost of developing protocol conversion software on the host computer end.

[0037] From this we can see that the HART protocol and the Modbus protocol have basically the same advantages in communication data, but in terms of hardware wiring, the HART protocol is more flexible than the Modbus protocol.

[0038] Second, considering the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are described in detail as follows:

[0039] The technical solutions to be protected by the present invention are:

[0040] 1. Rules (or methods) for setting network parameters of HART protocol to ModbusTCP protocol gateway

[0041] 2. Set the Modbus parameters in the HART protocol to ModbusTCP protocol gateway and the data type in the Modbus communication format.

[0042] Third, the creativity auxiliary evidence of the claims of the present invention is also reflected in the following important aspects: the present invention fills the technical problem in the industry regarding real-time communication between the HART protocol and the host computer. The present invention solves the technical problem of rewiring during the process of transforming the instrument from analog signal transmission to communication transmission. The instrument of the present invention can not only use analog signal transmission and ModbusRTU communication transmission, but also use HART protocol for transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;

[0044] Figure 1 This is the intention of the communication optimization method between the HART protocol and the host computer software provided by the embodiment of the present invention;

[0045] Figure 2 It is a flow chart of a method for testing a host computer software debugging system provided by an embodiment of the present invention;

[0046] Figure 3 It is a flow chart of a method for optimizing communication between the HART protocol and the host computer software in a communication test using WinCC host computer software provided by an embodiment of the present invention;

[0047] Figure 4 It is a flow chart of a method for optimizing communication between the HART protocol and the host computer software in a communication test using the host computer software of Intouch provided by an embodiment of the present invention;

[0048] Figure 5 It is a structural schematic diagram of a device for optimizing communication between a HART protocol and a host computer software provided by an embodiment of the present invention;

[0049] In the figure: 1. Instrument supporting HART protocol; 2. HART protocol to ModbusTCP protocol gateway device; 3. Ethernet switch; 4. Terminal device. DETAILED DESCRIPTION

[0050] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.

[0051] 1. Explanation of the embodiment:

[0052] The embodiment of the present invention provides a method for optimizing communication between a HART protocol and a host computer software, including:

[0053] Step 1: Enter the network parameters of the HART protocol to ModbusTCP protocol gateway, including the IP address, subnet mask, and remote port number. Use the configuration software corresponding to the gateway device to configure the relevant network parameters, change the address of the HART protocol to ModbusTCP protocol gateway to the network segment where the terminal device is located, and set the service port used by the ModbusTCP protocol to a digital identifier that can identify the signal transmission of the field device by default.

[0054] Step 2: Enter the Modbus parameters to determine the high and low bytes of the data type in the Modbus communication format.

[0055] Step three: after the implementation of steps one and two, the terminal device reads the data detected by the on-site equipment in real time and displays it on the screen.

[0056] In a preferred embodiment, before inputting the network parameters of the HART protocol to ModbusTCP protocol gateway in step 1, it is necessary to perform the following:

[0057] (1) Field devices supporting the HART protocol are connected to the HART protocol to ModbusTCP protocol gateway device through a two-core cable;

[0058] (2) The HART protocol to ModbusTCP protocol gateway device is connected to the Ethernet switch and terminal device via Ethernet.

[0059] In a preferred embodiment, in step (1), the field device supporting the HART protocol is connected in series with a HART protocol to ModbusTCP protocol gateway device through an analog quantity acquisition module on the basis of the original analog quantity signal line;

[0060] In step (2), the terminal device directly reads the field device data for the host computer, or uses the PLC to collect the field device data for logical operations and programming.

[0061] Example 1

[0062] The embodiment of the present invention provides a method for optimizing communication between the HART protocol and the host computer software. Taking the principle of the hardware wiring system as an example, the method for optimizing communication between the HART protocol and the host computer software is as follows: Figure 1 shown.

[0063] The optimization of the hardware wiring system specifically includes:

[0064] (1) Field instruments (instruments that support the HART protocol) can be connected to a gateway device (a gateway that converts the HART protocol to the ModbusTCP protocol) through a two-core cable. Alternatively, the gateway device and the analog acquisition module can be connected in series based on the original analog signal line. This connection method is exactly the advantage of the HART protocol. The original analog acquisition module not only does not affect its use, but also can be used to increase HART protocol communication. The two are fully compatible.

[0065] (2) The gateway device is connected to the Ethernet switch and terminal device via Ethernet. The terminal device can either use the host computer to directly read the instrument data or use the PLC to collect instrument data for logical operations and programming.

[0066] (3) After the hardware wiring is completed, set the network parameters of the HART protocol to ModbusTCP protocol gateway, including: IP address, subnet mask and remote port number. Change the address of the HART protocol to ModbusTCP protocol gateway to the network segment where the host computer or PLC and other terminal devices are located. At the same time, the service port used by the ModbusTCP protocol defaults to a recognizable digital identifier (502 can be selected).

[0067] (4) After the network parameters are set, set the Modbus parameters. The Modbus parameters are mainly set for the data type of the holding register inside the gateway device. Due to the different brands of various instruments, the data formats used inside are also different. It is necessary to analyze the high and low bytes of the data type in the Modbus communication format. Testing is required to finally confirm the correct data format. In addition, the working mode of the gateway device module must be selected as Modbus_RTU mode.

[0068] (5) After the HART protocol to ModbusTCP protocol gateway is set up, use Modscan software (a professional software that can debug all devices with Modbus protocol) to test the correctness of the data. After ensuring the data is accurate, start the next step and use the host computer software to read the instrument parameters.

[0069] Example 2

[0070] like Figure 2 As shown, the terminal device reads the data detected by the field equipment in real time and displays the screen. The terminal device directly reads the field equipment data for the host computer, or uses the PLC to collect the field equipment data for logical operations and programming. The host computer software debugging system test method includes:

[0071] S101, add a communication driver, set the communication driver parameters, and create a new communication channel;

[0072] S102, creating a new variable in the newly created communication channel, and filling in the data type and address of the variable;

[0073] S103, create a new screen, connect variables, and run the screen to test the correctness of the data.

[0074] Example 3

[0075] Based on the test method provided in Example 2 of the present invention, in the software debugging system provided in the embodiment of the present invention, there are many host computer software. The embodiment of the present invention uses WinCC and Intouch, the two most commonly used host computer software, to perform communication testing, and the communication settings of other host computer software are similar to this.

[0076] Furthermore, the following example uses WinCC host computer software for communication testing. Figure 3 The test method includes the following steps:

[0077] S301, WinCC software reads ModbusTCP data through ModbusTCP communication driver, sets parameters of WinCC software, double-clicks to open WinCC variable management, right-clicks on the variable management parent directory tree, and selects Modbus TCPIP driver in Add New Driver;

[0078] S302, after adding the Modbus TCP communication driver, right-click on the new connection in the Modbus TCP IP directory tree, right-click on the new connection and select connection parameters, set the connection parameters below, the CPU (Central Processing Unit) type is the default, the server IP address is filled in with the IP address of the HART protocol to Modbus TCP protocol gateway device, the port number is the default, the remote slave address is filled in with 1, remove the check in front of the conversion word type data to 16-bit value, and the connection parameters are set;

[0079] S303, after creating a new handshake connection, create a new test variable. The process is as follows: double-click the new handshake connection, fill in the variable name in the main dialog box on the right, select 32-bit floating point number as the data type, and the length and format adjustment will be automatically generated. Fill in the address information for reading data in the address, and the new test variable is completed. Next, connect the screen, open the WinCC graphic editor, create a new screen in the main dialog box on the right and open it, drag out the input / output field from the toolbar on the right, connect the input / output field to the newly created test variable to display the value of the test variable, and the connection between the variable and the screen is set;

[0080] S304, running screen, test data can be accurately displayed, communication test is successful, and WinCC software communication test is completed.

[0081] Example 4

[0082] Based on the test method provided in Example 2 of the present invention, further, taking the communication test using the host computer software of Intouch as an example, Figure 4 The test method includes the following steps:

[0083] S401, parameter setting of Intouch software: set parameters for the communication driver, start the SMC (System Management Console) driver software that comes with the Intouch software, create a new channel under the DASMBTCP driver (the Modbus protocol driver that comes with the Intouch monitoring software, used to communicate with all devices with the Modbus protocol), and select ModbusPLC Object (device object with the Modbus protocol) as the channel type;

[0084] S402, set parameters for the newly created ModbusPLC Object. First, name the newly created ModbusPLCObject channel. This name will be used in subsequent processes. Then configure the IP address in the Parameters of the channel. Here, you need to fill in the IP address of the HART protocol to ModbusTCP protocol gateway device. The rest of the parameters are default and do not need to be modified.

[0085] S403, after the configuration in step S402 is completed, reactivate the communication driver;

[0086] S404, start the Window Maker application of Intouch (the monitoring screen making program included in the Intouch monitoring software), and add a new access name in the Window Maker application. The process of creating a new access name is as follows: open Special-Access Name in the menu bar, click Add New Access Name in the access name selection box that opens, fill in DASMBTCP as the application name, and the subject name must be consistent with the name of the new channel in ModbusPLC Object. The rest of the parameters can be left as default;

[0087] S405, after the access name is set, you can create a new variable. The process of creating a new variable is as follows: open the menu bar Special-Tag Name Dictionary-New, enter the tag name (only English letters and symbols are supported), select the data type (generally select the real data format), and fill in the corresponding information for the above tag name in the comment. The function of recording data is optional. If checked, historical data can be queried. The function of raw data and engineering unit is whether the data needs to be proportionally converted. It converts the value of the raw data into the value of the engineering unit by equal proportion. If not, set both to the maximum value. Select the access name just created, and fill in the address of the read data in the project box. If the read data is in the real data format, the English letter F needs to be added to the end of the data address, indicating that the read data type is 32-bit floating point data;

[0088] S406, after the variables are established, connect the corresponding screen and run it, observe the numerical display results, the data is displayed normally, and the communication test of Intouch software ends here.

[0089] Example 5

[0090] like Figure 5As shown, an embodiment of the present invention provides a device for optimizing communication between the HART protocol and the upper computer software, including an instrument 1 supporting the HART protocol for collecting field data, which is connected to a HART protocol to ModbusTCP protocol gateway device 2 via a two-core cable; the HART protocol to ModbusTCP protocol gateway device 2 is connected to an Ethernet switch 3 and a terminal device 4 via Ethernet.

[0091] In the two tests in the above embodiments, the host computer software reads the test results of the same field instrument, and the connection methods of other host computer software are similar.

[0092] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0093] Since the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present invention, their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0094] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment.

[0095] 2. Application examples:

[0096] Application Examples

[0097] The method for optimizing communication between the HART protocol and the host computer software provided in the embodiment of the present invention can be applied to a water supply pressure detection station. The water supply pressure detection station implements the method for optimizing communication between the HART protocol and the host computer software to perform communication between the HART protocol and the host computer software and screen display.

[0098] It can also be applied to a sewage and wastewater discharge index detection station, which implements the communication optimization method between the HART protocol and the host computer software, and performs communication between the HART protocol and the host computer software and screen display.

[0099] In short, the application examples of the present invention can be used not only in water supply pressure, but also in flow meters, liquid level meters, etc. In summary, this method can be used for any instrument that supports the HART protocol.

[0100] An embodiment of the present invention further provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.

[0101] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0102] An embodiment of the present invention further provides an information data processing terminal, which, when executed on an electronic device, provides a user input interface to implement the steps in the above method embodiments. The information data processing terminal is not limited to mobile phones, computers, and switches.

[0103] An embodiment of the present invention further provides a server, which is used to provide a user input interface to implement the steps in the above method embodiments when executed on an electronic device.

[0104] An embodiment of the present invention provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0105] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0106] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0107] III. Evidence of the relevant effects of the embodiments:

[0108] There are 6 E+H flowmeters in a water plant in the Economic and Technological Development Zone of a certain city, all of which are factory-measured flowmeters. Before the transformation, the instantaneous flow of the 6 flowmeters was transmitted by analog signals, and the cumulative flow was calculated by pulse signal accumulation. Since they are factory-measured flowmeters, the accuracy of the real-time data of the flowmeter is high, because the total water supply of each flowmeter needs to be statistically calculated in order to arrange subsequent production operations. Since the flowmeter data is transmitted by traditional analog signals and pulse signals, the real-time performance and accuracy can no longer meet the needs of the factory and need to be transformed. In the early stage of the transformation, the hardware of the 6 flowmeters was scattered and it was troublesome to rewire them one by one. Moreover, the instantaneous flow signal could not be interrupted for a long time during the transformation. After technical analysis, it was decided to adopt the HART protocol transmission method and retain the original analog signal so that it could still receive data during the transformation. After the transformation was completed, a report automatic generation script was added to the host computer. The operator only needed to print out the report on time every day. The flowmeter data of the host computer was exactly the same as the actual display on site, which was convenient for the operator to count the total water supply.

[0109] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for optimizing communication between the HART protocol and host computer software, characterized in that: The method includes optimization of hardware wiring system and software aspects; The optimization of the hardware wiring system specifically includes: (1) The field instrument is connected to the HART protocol to ModbusTCP protocol gateway through a two-core cable, or the gateway device and the analog acquisition module are connected in series based on the original analog signal line. The two are fully compatible; (2) The gateway device is connected to the Ethernet switch and terminal device via Ethernet. The terminal device uses the host computer to directly read the instrument data, or uses the PLC to collect instrument data for logical operations and programming; (3) After the hardware wiring is completed, set the network parameters of the HART protocol to ModbusTCP protocol gateway, including: IP address, subnet mask and remote port number; change the address of the HART protocol to ModbusTCP protocol gateway to the network segment where the host computer or PLC terminal device is located, and the service port used by the ModbusTCP protocol defaults to a recognizable digital identifier; (4) After the network parameters are set, set the Modbus parameters. The Modbus parameters are set for the data type of the holding register inside the gateway device. Different data formats are used internally according to the different brands of various instruments. The high and low bytes of the data type in the Modbus communication format are analyzed. After testing, the correct data format is finally confirmed. The working mode of the gateway device module is selected as Modbus_RTU mode. (5) After the HART protocol to ModbusTCP protocol gateway is set up, use Modscan software to test the correctness of the data. After ensuring the data is accurate, start the next step and use the host computer software to read the instrument parameters; The software optimization includes: after the gateway device module converts the HART protocol data format into the Modbus protocol data format, the host computer software directly reads the data; The method for optimizing communication between the HART protocol and the host computer software specifically comprises the following steps: S1, input the network parameters of the HART protocol to ModbusTCP protocol gateway, including the IP address, subnet mask and remote port number, use the gateway device configuration software to configure the network parameters, change the address of the HART protocol to ModbusTCP protocol gateway to the network segment where the terminal device is located, and set the service port used by the ModbusTCP protocol to the digital identifier that can identify the signal transmission of the field device by default; S2, input the set Modbus parameters and determine the high and low bytes of the data type in the Modbus communication format; S3, after the implementation of step S1 and step S2, the terminal device reads the data detected by the on-site equipment in real time and displays it on the screen; In step S1, before entering the network parameters of the HART protocol to ModbusTCP protocol gateway, you need to: (1) Field devices supporting the HART protocol are connected to the HART protocol to ModbusTCP protocol gateway device through a two-core cable; (2) The HART protocol to ModbusTCP protocol gateway device is connected to the Ethernet switch and terminal device via Ethernet; In step (1), the field device supporting the HART protocol is connected in series with the HART protocol to ModbusTCP protocol gateway device through the analog quantity acquisition module on the basis of the original analog quantity signal line; In step (2), the terminal device directly reads the field device data for the host computer, or uses the PLC to collect the field device data for logical operations and programming; In step S3, after the implementation of step S1 and step S2, the terminal device reads the data detected by the field device in real time, and displays the data on the screen, including the following steps: Step 1, add a communication driver, set the communication driver parameters, and create a new communication channel; Step 2: Create a new variable in the newly created communication channel and fill in the variable's data type and address; Step 3: Create a new screen, connect variables, and run the screen to test the correctness of the data.

2. According to the communication optimization method between the HART protocol and the host computer software according to claim 1, it is characterized in that, The terminal device uses WinCC and Intouch software to read the data detected by the field equipment in real time and display it on the screen.

3. A device for optimizing communication between the HART protocol and the host computer software, which implements the method for optimizing communication between the HART protocol and the host computer software according to any one of claims 1 to 2, characterized in that: The device comprises an instrument (1) supporting the HART protocol for collecting field data, which is connected to a HART protocol to ModbusTCP protocol gateway device (2) via a two-core cable; the HART protocol to ModbusTCP protocol gateway device (2) is connected to an Ethernet switch (3) and a terminal device (4) via Ethernet.

4. A program storage medium for receiving user input, characterized in that: The stored computer program enables the electronic device to execute the communication optimization method between the HART protocol and the host computer software as described in any one of claims 1-2.

5. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the communication optimization method between the HART protocol and the host computer software as described in any one of claims 1-2.

6. A water supply pressure detection station, characterized in that: The water supply pressure detection station implements the communication optimization method between the HART protocol and the host computer software as described in any one of claims 1-2, and performs communication between the HART protocol and the host computer software and screen display.

7. A sewage and wastewater discharge index detection station, characterized in that: The sewage and wastewater discharge index detection station implements the communication optimization method between the HART protocol and the host computer software as described in any one of claims 1-2, and performs communication between the HART protocol and the host computer software and screen display.

Citation Information

Patent Citations

  • Water supply system's remote monitering system based on GPRS

    CN206224165U