Thread Content
How to read the real-time data from flow meters into a host computer using the HART protocol: http://yunrun.com.cn/tech/2671.html HART is an open communication protocol for addressable remote sensors; it was developed by the American company ROSEMOUNT in 1985 as a protocol for communication between field intelligent instruments and equipment in control rooms. HART devices provide communication with a relatively low bandwidth and moderate response times. After more than 10 years of development, HART technology has become highly mature abroad and has emerged as the industrial standard for smart instruments worldwide. HART communication uses a half-duplex mode of transmission; its feature is that it enables digital signal communication over existing analog signal transmission lines. It represents a transitional product in the shift from analog systems to digital systems, and therefore possesses strong market competitiveness during this period of transition, which has led to its rapid development. Project Background: A wastewater treatment plant needs to monitor the real-time flow rate and cumulative flow rate at the discharge outlet using E+H flow meters. Since the flow meter at the discharge outlet is located about 1 kilometer away from the PLC responsible for data collection, and 4-20mA signals are used, the real-time flow rate still experiences fluctuations due to interference. Traditional cumulative flow measurement relies on the contact signals from flow meters, with each pulse representing 1 m3 of water volume. However, over time, this method results in significant errors in the cumulative flow values calculated by the PLC; monthly corrections are required, which is time-consuming and labor-intensive. Based on these two points, it is desired to read instrument data in real time via communication. Due to the long distance, RS485 communication is unstable; therefore, the HART protocol is considered the preferred option. Steps for reading real-time data from a flow meter via the HART protocol: 1. Since the on-site PLC does not have an RS485 port, this communication is carried out using the Songmao SM100-TCP Ethernet data acquisition module to convert HART signals into Ethernet signals. The actual product is shown in Figure 1: http://yunrun.com.cn/upload/201908/08/201908081556503360.png. Figure 1 shows the Songmao SM100-TCP Ethernet data acquisition module. 2. This flow meter is a four-wire instrument; wiring should be carried out according to the flow meter’s wiring diagram. It should be noted that 250Ω resistors need to be connected in parallel across the positive and negative terminals of the instrument. 3. After connecting the wires as shown in the diagram, power it on to configure the module. Open the configuration and debugging software, and configure the ETD network parameters by clicking “Configure and View ETD Network Parameters”. For the specific configuration of parameters, please refer to “Configure Stateful Network Parameters”. As shown in Figures 2 and 3. http://yunrun.com.cn/upload/201908/08/201908081557469492.png Figure 2: Interface of the SM100-TCP parameter configuration software. Figure 3: Configuration and viewing of network parameters. 4. Configuring HART transparent mode: ① Configure HART instrument parameters: a. HART address: This is the address of the HART instrument. b. HART command operation mode: There are master mode and secondary master mode available for selection, which can be chosen according to the requirements of the instrument. c. Prefix length: The number of ‘FF’ characters in the HART command prefix, usually 6 bytes. ②HART instrument parameter query: It allows for the retrieval of basic parameter information for HART instruments. ③General HART command data query: It allows reading the real-time data from general HART instruments, but it cannot display the real-time data from other custom instruments. http://yunrun.com.cn/upload/201908/08/201908081604109438.png Figure 4: Reading real-time data from instruments via the SM100-TCP parameter configuration software. 5. MODBUS TCP data query, as shown in Figure 5. ① This interface allows for the reading of data from analog and HART instruments, as well as digital switches. ②Module operation mode: When it is necessary to output data in MODBUS-TCP or MODBUS-RTU format, the module’s operation mode should be set to “Automatic communication using HART address 0”. http://yunrun.com.cn/upload/201908/08/201908081608027697.png Figure 5: Setting the operation mode of SM100-TCP. 6. With these few simple settings, it is generally possible to conduct data tests using MODBUS testing software. ModScan was used for this software testing. As shown in Figure 9: http://yunrun.com.cn/upload/201908/08/201908081612348198.png. Figure 6 shows data testing using the MODBUS testing software: http://yunrun.com.cn/upload/201908/08/201908081614143119.png. Figure 7 depicts the data testing interface: http://yunrun.com.cn/upload/201908/08/201908081615270123.png. Figure 8 shows the display on the E+H instrument. Real-time Hart communication enables the transmission of real-time data from the instrument. By consulting the table, it can be seen that so far we have been able to read the real-time data from the flow meter onto a host computer using the Hart protocol. Author: Lai Bohai, with over a decade of experience in automated control systems. He specializes in various types of water treatment automation solutions, and is familiar with the programming of mainstream PLCs such as those from AB, Schneider, Siemens, and Mitsubishi, as well as with screen configuration and application development. He also has in-depth knowledge of various control instruments. Source: Digital Display Instruments http://yunrun.com.cn/product/