Detailed explanation of return value calculation of HART Protocol

Source: Internet
Author: User

We have introduced some command calculations for the adapter HART protocol. It also contains the related content of the returned data computation. Here we will focus on this part of knowledge.

Return data computing

After repeated experiments and reasoning, the formula based on HART protocol data is derived.

The following describes the current and liquid level.

Calculation of current value:

 
 
  1. dlH=((parseddataHart[13] + parseddataHart[12] * 256.0 +(parseddataHart[11] & 127) * 65536.0))/8388608.0 +1;  
  2.  
  3. dlD=(((parseddataHart[10]*1) & 127) * 256 + ((parseddataHart[11]*1) & 128)) / 128 - 127; 

Calculation of liquid level value:

 
 
  1. ywH=((parseddataHart[18] + parseddataHart[17] * 256.0 +(parseddataHart[16] & 127) * 65536.0))/8388608.0 +1;  
  2.  
  3. ywD=(((parseddataHart[15]*1) & 127) * 256 + ((parseddataHart[16]*1) & 128)) / 128 - 127; 

Start the serial port debugging program or send related commands by the upper computer to convert the data. The client can analyze the collected data and obtain useful values.

Send the calculated data to the corresponding storage area. You can process the data as needed. You can also extract useful data volumes based on your needs. For specific reading commands, see related technical books or obtain the instrument-specific protocol from the HART instrument manufacturer and dealer.

As long as the RS-232 is supported, the operating system and the upper computer configuration software can easily communicate with the HART instrument.

The conversion of this HART protocol adapter is completely transparent. It only processes the problem of mutual conversion between the HART signal and the serial port signal. It works at the application layer and is only applicable to products that comply with the HART protocol, it has nothing to do with specific suppliers. Reading commands and data does not have any relationship or impact.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.