#英文#HART协议理解及开发思路

本文详细介绍了HART(Highway Addressable Remote Transducer)协议的基本概念和技术特性,包括其三层架构:物理层、数据链路层及应用层。此外,还探讨了HART协议的技术特点,如两种通信通道、标准操作过程及两种通信拓扑结构等,并深入解析了FSK调制方式、命令类型与功能以及消息结构等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


HART (Highway Addressable Remote Transducer), is one of the industrial field bus standards.

Three main layers

Physical layer: analog signal transmission on 4~20 mA carrier;
Data link layer: ensure reliable data transmission on the physical layer;
Application layer: correct implementation of information interactive ;

Technical characteristics

Both two types of communication channels:

  1. 4~ 20mA analog communication
  2. modulated data communication;

Standard operation process:

  1. loop test;
  2. 4~ 20mA analog setting;
  3. Sensors adaption;

Two communication topologies :

  1. Point-to-pointing (classic)
    In the HART network, two Master is allowed, one for system control, another for handling device.
    在这里插入图片描述

  2. Point to multi-point
    在这里插入图片描述

Two communication interactive modes :
2.1. Request mode (Master-slave mode):
2.1.1 The slave response when the request is received ;
2.1.2 Other Masters will be allowed to send requests when time is idle;
2.1.3 2~ 3 times interaction each second;

2.2. Burst mode (slave pub process data):
2.2.1 slave selectable mode;
2.2.2 slave periodic sending measurement;
2.2.3 Other Masters will be allowed to send requests when time is idle;
2.2.4 3~ 4 times interaction each second;

FSK (frequency shift keying)

在这里插入图片描述

HART command types and functions

See the table below:
在这里插入图片描述
在这里插入图片描述

HART message structure

Usually, long-structure and short-structure are used in a different version of HART, for example, HART 5.0 and earlier versions would work with short-structure. Due to the non-uniqueness of the message to HART, it should be considered when designed, but no longer than 25 bytes, generally includes:

  1. Preamble // includes 5 to 20 0xFF, it could be seen as a kind of synchronous signal, check master and slave machine at the beginning of transmission;

  2. Delimiter // start byte includes information about ‘whether long or short structure’, ‘message source’, ‘what type of message’;
    When master to slave is short-structure, this byte is 02;
    When master to slave is long-structure, this byte is 82;
    When slave to master is short-structure, this byte is 06;
    When slave to master is long-structure, this byte is 86;
    Burst mode: short-structure is 01, long-structure is 81;

  3. Address // address byte includes slave and master address;

  4. Command //command byte,0x00 to 0xFD 253 in total;

  5. Bcnt // total data length, it could help to find check-byte and know of the message ends;

  6. Status // status byte, also called ’response code’;

  7. Data // data byte

  8. Check // parity check byte;
    在这里插入图片描述
    There are two frame formats of HART communication from Master to slave and Slave to master. When considering how to build a data structure of a message to satisfy communication with strong flexibility, the content difference between commands should be clearly understood.

  9. Master-to-slave frame
    /preambles +delimeter+ expansion+ longAddr+ byteCnt+ data
    20 + 1 + 3 + 5 +1 + 255 =285
    /
    [ Preamble ]: length depends ( max 20 bytes)
    [ Delimiter ]: fixed-length ( 1 byte)
    [ Address ]: long address(5 bytes) or short address(1 byte) types
    [ Command ]: fixed-length ( 1 byte)
    [ Byte Count ]: fixed-length ( 1 byte)
    [ Data ]: length depends ( max 255 bytes)
    [ Check Byte ]: fixed-length ( 1 byte)
    Also, the expansion byte should be considered in this section.
    According to specific commands, the length of the frame will be different, for example, in the command 0 in the universal command type, the requested data is 0, and using the short address type, it makes the whole length of the frame much shorter than most commands, as a developer, that’s what we concerned when an attempt to build once communication at the beginning.

  10. Slave to the master frame
    Similar to the previous structure, more details will be analysed in serials commands, especially data content.

Program Concerns

在这里插入图片描述
Some points before coding through my experience:

  1. How to understand analog and digital signals in HART transmission;
  2. The configuration of analogue signal output, such as slew rate.
  3. The frame of message in communication, includes how to build an unfixed message, and response time setting(timer).
  4. What command type will be used, clearly understand their difference in each frame section.
  5. Basic communication builds, and debugging.
  6. Build a structure to analyze response data, and translate it to USER data from BYTE data, such as read loop current value.

写完了终于可以吃饭去了

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值