Leave Your Message
News Categories
Featured News

YOKOGAWA flowmeter hart to modbus communication test

2025-12-25

The HART protocol employs the FSK frequency shift keying signal based on the Bell202 standard, superimposing an audio digital signal with an amplitude of 0.5mA on a low-frequency 4-20mA analog signal for bidirectional digital communication, with a data transmission rate of 1.2kbps. Since the average value of the FSK signal is 0, it does not affect the size of the analog signal transmitted to the control system, ensuring compatibility with the existing analog system. In HART protocol communication, the main variables and control information are transmitted via 4-20mA. When necessary, additional measurement, process parameters, equipment configuration, calibration, and diagnostic information are accessed through the HART protocol.

There is a batch of instruments in the chemical plant whose output signals are based on the hart protocol. Users need to read the instantaneous and cumulative values of the hart instruments for collection by the 485 gateway. Considering the interface transmission issue, a hart to 485 converter was selected on site. That is the Songmao SM100-B module.

 图1.jpg

The SM100-B module can convert the Hart protocol to the Modbus RTU protocol. A single module can be connected to 4 hart meters. In this project, there are 10 hart meters in one workshop. According to the Hart protocol, up to 15 meters can be connected on one line and connected together. At this time, the connection method is the same as that of Modbus meters. This kind of module needs to be set to transparent mode, that is, it directly sends Hart messages through the computer to communicate with the instruments on the bus, but the back-end protocol messages need to be parsed by itself.

The instrument needs to read one moment and one accumulation. The instrument brand is YOKOGAWA, as shown in the following figure:

图3.jpg

The wiring on the back of the instrument is shown in the figure:

图4.jpg

Data reading

1.Device address reading

Not all hart instruments can be connected at once. First, one hart table needs to be connected. Set the hart instrument addresses in the transparent working mode interface. After all the data is uploaded, disconnect the first one and set the hart address of the second instrument. After each instrument goes through these two steps, they should all be connected on a single line. It should be particularly noted here that if multiple hart instruments are connected, the hart address needs to be set starting from 1

图5.jpg

图6.jpg

After connecting to the 485 serial port, click on [Query Instrument Parameters], select the corresponding instrument number, and obtain the device parameters, mainly the device address, which is used for subsequent data queries. The true message is as follows:

 

Request message:FF FF FF FF FF FF FF 02 80 00 00 82

Return message:FF FF FF FF 06 80 00 18 00 40 FE 37 20 05 07 01 01 00 00 B4 F1 86 05 05 00 33 00 00 37 00 37 01 C4

 

Response message analysis:

B3X`C`Y{KNAV{G~1F4_J)_N.png

Short frames are used for command 0, and long frame command formats are generally used afterwards.

1.Set the polling address

If multiple instrument devices are connected in parallel on a single line, polling addresses need to be set. Once set, the analog signal on the line is fixed at the minimum current of 4mA. In the example, we set it to 02

图7.jpg

Send FF FF FF FF FF FF FF 82 37 20 B4 F1 86 06 01 02 53

Return FF FF FF FF 86 37 20 B4 F1 86 04 00 48 02 00 1A

2.Read general variable data

By using Command No. 3 to obtain the basic variable data, we only need the instantaneous value and the cumulative value.

图8.jpg

Send:FF FF FF FF FF FF FF 82 37 20 B4 F1 86 03 00 55

Return:FF FF FF FF 86 37 20 B4 F1 86 03 1A 00 40 40 82 F6 BF 13 3E CF 78 1F 2B 41 62 5B D4 2B 00 00 00 00 2B 00 00 00 00 82

Response message analysis

0W4$M[K[3Y624UC{`T6MHFC.png