HART Communication Protocol: One. Overview
HART Communication Protocol: One. Overview
One. Overview
keying signal based on Bell202 standard, superimposes audio digital signal with amplitude of
0.5mA on low frequency 4-20mA analog signal for two-way digital communication, data
transmission rate is 1200bps. 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 the HART protocol communication, the main variables and control information
configuration, calibration, and diagnostic information are accessed through the HART protocol.
At the application layer, HART defines a series of commands, which work in command
mode. It has three types of commands. The first is called general commands, which are understood
and executed by all devices; the second is called general application commands, and the functions
provided can be implemented in many field devices (though not all); The third type is called
device-specific commands to facilitate the work to achieve special functions in certain devices.
This type of command can be used in the foundation and can be unique to the company that
two. meaning
1、 Master:Divided into the first host and the second host, it can be connected to the HART
2、 Slave (Field Device): It is connected to the process control site, has the function of
measuring and calculating multiple variables, and can carry out HART communication with
the host;
1
3、 Long Frame: Address is a HART data frame composed of 5 bytes. All HART
commands support long frame data frames. The meaning of each byte of the long frame
In production, the serial number of the same type of equipment is unique and never repeated. The
broadcast address uses a long frame structure, and the lower 38 BITs are all 0.
The device type (Decive Type) specified by the manufacturer and the manufacturer ID meet the
设 备 类 型 代 码 指 定 原 则
common commands for short framesCommand 0 can be used, and the meaning of the short
frame byte is as follows: All HART slaves support long and short frames.
2
低 6位 短 帧 地 址 : 轮 询 从 机 地 址
1: 从 机 在 突 发 模 式
0: 正 常 模 式
主 机 地 址
0: 第 二 主 机
1: 第 一 主 机
短 帧 Address字 节 含 义
5、 Request frame (STX):The host (such as the hand-copy device) sends a request data
6、 Acknowledgement frame (ACK): The data returned from the slave to the master;
7、 Preamble: The 0xFF character sent by the device that initiates the command (data)
transmission before the data frame is transmitted. The number of characters sent is generally
5-20, and the number can be changed by commands; the preamble is used to make the data
receiving end in The CD carrier detection signal is generated on the hardware circuit to realize
8、 Delimiter: Indicates the beginning of the data frame transmission, indicating the data
transmission direction and physical layer type. At the same time, it also specifies the frame
type (long and short frames) of the data frame. Its meaning is as follows:
帧 类 型 ( 传 输 方 向 )
001: 突 发 模 式
010: 主 机 向 从 机 请 求 数 据 ( STX)
110: 从 机 向 主 机 回 复 数 据 ( ACK)
物 理 层 类 型
00: 异 步 ( FSK)
01: 同 步 ( ACK)
扩 展 字 节 数
为 00
地 址 类 型
0: 短 帧 1字 节 ( 轮 询 )
1: 长 帧 5字 节 ( 唯 一 地 址 )
9、 Address: Two types of short frame (1 byte) or long frame (5 bytes) are designated by
the delimiter Delimiter. The definitions of long and short frames are as above;
10、 Expansion Bytes: The company's current HART protocol version is reserved, which is
0;
3
11、 Command: Function code, indicating the specific realization function of a data frame,
13、 Data: Set or read the parameter data of the specified slave (the final result of
communication);
14、 Check Byte:Exclusive OR value of all bytes from Delimiter to Data, that is, vertical
check.
1、 Communication frame format:It is composed of preamble and data frame, and the definition
前 导 符 数 据 帧
Expansion Command Bytes Check
Preamble Delimiter Address Count Data Byte
bytes
5-20字 节
固 定 为
+ 定 界 符
地 址
短 帧 1字 节 扩 展 字 节 命 令 数 据 个 数 数 据 校 验 字 节
1字 节 长 帧 5字 节 0— 3字 节 1字 节 1字 节 n字 节 1字 节
( 0xFF)
2、 Communication rate:1200Bps;
3、 Communication signal: Bell202 standard FSK frequency shift keying signal, '1200Hz'
4、 Data format (11 bits): 1 start bit, 8 data bits, 1 stop bit, 1 check bit, byte odd (Odd) check;
5、 Number of data in response data frame(Bytes Count) is at least 2 bytes, these two bytes are
6、 Response code format: The command execution status code returned by the slave to the host.
When a communication error occurs, the highest bit of the response is bit7=1, then the device
status code has no practical meaning; when bit7=0, the communication is normal, and the
remaining 6 bits indicate the command execution The response of the situation.
* The specific meaning depends on different commands, you can check the related HART
4
command data.
5
0x01 The main variable exceeds the limit
10、 type of data: HART communication protocol supports the following types of data:
string Str, date, single or double-precision floating-point number Float, unsigned integer
number Unsigned, signed integer number Signed, union Enum or bit Bit. Data transmission
1) String: The string supports standard Latin letters Latin and the ASCII code of the packaging
format Packed. Each Latin character occupies 1 byte; the ASCII code of the packaging format
occupies 6 digits of 1 byte per letter. Therefore, Every 4 letters are encapsulated in 3 bytes, and
2) Floating point number: Meet the requirements of IEEE754 standard, single-precision floating-
point number is represented by 4 bytes, and double-precision floating-point number is represented
by 8 bytes.
1— bit 8— bit 23— bit
符 号 位 指 数 小 数
单 精 度 浮 点 数 格 式
Unrecognizable floating-point numbers are represented by 0x7f, 0xa0, 0x00, and 0x00.
11、Device Variable Status: All data that needs to be processed periodically (such as device
variables and dynamic variables) include a device variable status byte, the content of which is
6
four. HART application commands
There are three types of commands: general commands, general application commands, and
device-specific commands. General commands are commands that all HART field devices must
respond to; general application commands are only partially used by the device; device-specific
7
Abnormal 0x86 0x00|38 bits ID NULL 0 2 status XOR
response
Normal response frame data content
8
Normal 0x86 0x00|38 bits ID NULL 1 7 Status + XOR
response data
Abnormal 0x86 0x00|38 bits ID NULL 1 2 status XOR
response
Normal response frame data content
9
0x82 0x00|38 bits ID NULL 3 0 NULL XOR
Response frame ACK:
Note: When the field device is manufactured, the polling address is set to 0, and the loop current is
allowed. This is to ensure that the HART field device can receive a field device with only
1
analog signals. When the polling address is set to 0, the slave device must work in the loop
current mode (one-to-one) at the same time, and the current is associated with the basic
variable value; when the polling address is set to other values, the slave device must work in
the non-loop at the same time In current mode (one-to-many), the current is set to the
11
byte type of data value Description Can be
changed
0 Enum 65 (0x41) Dynamic variable classification (pressure type) N
1
12-15 Float Single-precision floating-point number represents N
the value of the host variable
16 Enum 0xc0 Device variable status (variables are normal, no N
restrictions)
Note: When trying to read the device variables (up to 4 variables, the number of
variables can be read arbitrarily, the first (main) variable must be read when
reading the second variable, and the first and second variables must be read
1
0x82 0x00|38 bits ID NULL 12 0 NULL XOR
11. Command 13: read short label, device descriptor and date
Request frame STX:
1
Delimiter Address Expansion Command Bytes Data Check
Bytes Count Byte
0x82 0x00|38 bits ID NULL 14 0 NULL XOR
Response frame ACK:
1
0x01 0x01: Square root output
2 Enum Main variable unit, see Appendix 1 "Unit Code" N
3-6 Float Upper limit value of main variable N
7-10 Float Lower limit value of main variable N
11-14 Float Primary variable damping (unit: seconds) N
15 Enum Write protection, 0=no write protection; 1=write N
protection; 251=no write protection function
16 Enum Manufacturer identification code (same as N
manufacturer ID)
17 Bits 0x01 If the bit is 1, this field device has an ADC N
connected to this channel
1
0-23 Packed Information content written Y
Response frame ACK:
16. Command 18: write short label, device descriptor and date
Request frame STX:
1
byte type of data value Description Can be
changed
0-2 Unsigned-24 Final assembly number Y
Response frame ACK:
1
changed
0-31 Latin-1 Long label content N
Response frame data content is the same as Command 0
1
(2) Common application commands
* Note: HART 6 stipulates that the number of device variables does not exceed 4. The above "5th
variable" is only for our company's internal use. This variable will be shielded during HART
certification;
2
8-11 Float Current value N
2
2. Command 34: Write the damping value of the main variable
This command is equivalent to the local configuration function "06 DAMP", which sets the
3. Command 35: Write the lower limit and upper limit of the main
variable
This command is equivalent to the local configuration functions "04 LRV" and "05 URV", that is,
2
precision floating-point number
5-8 Float The lower limit range value represented by a Y
single-precision floating-point number
Response frame ACK:
Enter the full-scale pressure and execute this command after the reading is stable. After execution,
the transmitter sets the current pressure value as the upper limit, and the output current is 20mA.
Enter the zero pressure and execute this command after the reading is stable. After execution, the
transmitter will set the current pressure value to the lower limit and output current 4mA.
2
0x82 0x00|38 bits ID NULL 37 0 NULL XOR
Response frame ACK:
reset
in the range of 4-20mA, and when the setting value is 0, it exits the fixed current mode.
2
8. Command 41: Make the device perform a self-check
Request frame STX:
11. Command 45: Adjust the zero point of the loop current
Adjust the offset of the loop current curve so that the zero current corresponds to 4mA. This
2
command does not affect the slope of the current curve.
2
The data content of the normal response frame is the same as the request frame
14. Command 49: Write the serial number of the main variable sensor
Request frame STX:
2
response data
Abnormal 0x86 0x00|38 bits ID NULL 49 2 status XOR
response
The data content of the normal response frame is the same as the request frame
2
byte type of data value
0 Unsigned—8 0x00 (0x01, 0x02, 0x03)
1-3 Unsigned—24 0x00, 0x00, 0x00
4 Enum 0xfa (250)
5-8 Float 0x7f, 0xa0, 0x00, 0x00
9-12 Float 0x7f, 0xa0, 0x00, 0x00
13-16 Float 0x7f, 0xa0, 0x00, 0x00
17-20 Float 0x7f, 0xa0, 0x00, 0x00
twenty Enum 0xfa (250)
one
twenty Enum 0xfa (250)
two
2
0 Enum 0x00 0x00=Not locked (unlocked) Y
0x01 0x01=Temporarily locked (the device is powered
0x02 on or reset to unlock)
0x02=Permanently locked
Response frame ACK:
3
Delimiter Address Expansion Command Bytes Data Check
Bytes Count Byte
0x82 0x00|38 bits ID NULL 130 0 NULL XOR
Response frame ACK:
3
2 Enum Flange type N
246 conventional
247 Coplanar
248 Remote sealing
249 Level_3_150
249 Level_4_150
249 Level_3_300
249 Level_4_300
249 Level_80_40
249 Level_100_40
249 Level_100_10_1
252 unknown
253 special
250 Undefined
3
5 Enum Number of remote transmission devices N
1 1 piece
2 2 pcs
251 No
252 unknown
250 Undefined
3
oil
241 No. 800 oil
242 Inert oil
Glycerin/wa
243
ter
Propylene
244 glycol/wate
r
245 Neobee/M20
251 No
252 unknown
253 special
250 Undefined
3
Delimiter Address Expansion Command Bytes Data Check
Bytes Count Byte
Normal 0x86 0x00|38 bits ID NULL 131 14 Status + XOR
response data
Abnormal 0x86 0x00|38 bits ID NULL 131 2 status XOR
response
The data content of the normal response frame is the same as the request frame
3
1: ±7.0kPa (Rosemount-range 3)
2: ±37.4kPa (Rosemount-range 4)
3: ±186.8kPa (Rosemount-range 5)
4: ±690kPa (Rosemount-range 6)
5: ±2068kPa (Rosemount-range 7)
6: ±6890kPa (Rosemount-range 8)
7: ±20680kPa (Rosemount-range 9)
8: ±41370kPa (Rosemount-range 0)
250: undefined
3
response
The data content of the normal response frame is the same as that of the request frame.
3
The data content of the normal response frame is the same as that of the request frame.
3
Delimiter Address Expansion Command Bytes Data Check
Bytes Count Byte
Normal 0x86 0x00|38 bits ID NULL 137 3 Status + XOR
response data
Abnormal 0x86 0x00|38 bits ID NULL 137 2 status XOR
response
Normal response frame data content
3
0 or 1 Memory code
0 Enum 0: EEPROM N
1: FLASH
0x0000~0x1FFF Specify the memory address
1-2 Unsigned-16 or EEPROM: 0x0000~0x1FFF N
0x0400~0x0BFF FLASH: 0x0400~0x0BFF
3 Enum 1~32 Number of bytes (1~32) N
4
~35 Unsigned-8 Byte data read (1~32) N
(maximum)
Can be
byte type of data value Description
changed
Memory code
0 Enum 0 or 1 0: EEPROM Y
1: FLASH
0x0000~0x1FFF Specify the start address of the memory
1-2 Unsigned-16 or EEPROM: 0x0000~0x1FFF Y
0x0400~0x0BFF FLASH: 0x0400~0x0BFF
3 Unsigned-8 1~32 Number of bytes (1~32) Y
4
~35 Unsigned-8 Byte data to be written (1~32) Y
(maximum)
Response frame ACK:
4
The following commands 140~141 are used to read/write calibration data .
1. Pressure Factory Calibration: Namely "calibration", used by the manufacturer.
Establish the corresponding relationship between the sensor voltage value (Vs)
and the applied calibration pressure value (Pc). The pressure value output after
2. Pressure user calibration: Used by the manufacturer or user. When the error of the original
Establish the relationship between the original pressure value (P0) and the
Establish the relationship between the original current value (I0) and the
4. 4-20mA user calibration:Same as factory calibration, but the number of calibration points is
5. Temperature compensation:
Temperature set point: the temperature value of temperature compensation, measured by the
transmitter and transmitted to the host computer through HART. Such as: -39.5,
-10.1, 0.02, 15.3, 35.0 (DegC)
Pressure set point: The standard pressure value applied under each temperature set point is set by
the host computer, and the pressure controller is controlled to output the
corresponding pressure. Such as: -1000.0, -500.0, 0, 500.0, 1000.0 (kPa)
Pressure measurement point: The actual measurement value corresponding to each pressure setting
point is measured by the transmitter and transmitted to the host computer through
HART. Such as: -997.4, -498.8, 0.8, 501.2, 1002.6 (kPa)
4
Request frame data:
Can be
byte type of data value Description
changed
Type code T
0: Pressure factory calibration
1: Pressure user calibration
0 Enum Y
2: 4-20mA factory calibration
3: 4-20mA user calibration
4: Temperature compensation
Calibration point number N1
Pressure factory calibration: 0~S1-1
Pressure user calibration: 0~S1-1
4-20mA factory calibration: 0~S1-1
1 Unsigned-8 4-20mA user calibration: 0~S1-1 Y
Temperature compensation (temperature point
serial number): 0~S1-1
* S1 is the total number of calibration points
in this category.
Calibration point number N2
Pressure factory calibration: 250 (no)
Pressure user calibration: 250 (no)
4-20mA factory calibration: 250 (no)
2 Unsigned-8 4-20mA user calibration: 250 (no) Y
Temperature compensation (pressure point
serial number):0~S2-1
* S2 is the total number of pressure points in
temperature compensation
Response frame ACK:
Can be
byte type of data value Description
changed
0 Enum Type code T N
Pressure factory calibration: 0
Pressure user calibration: 1
4-20mA factory calibration: 2
4-20mA user calibration: 3
4
Temperature compensation: 4
Total number of calibration points S1
Pressure factory calibration: 3~41
Pressure user calibration: 2~11
1 Unsigned-8 4-20mA factory calibration: 2~32 N
4-20mA user calibration: 2
Temperature compensation (total number of
temperature points): 2~9
Total number of calibration points S2
Pressure factory calibration: 250 (useless)
Pressure user calibration: 250 (useless)
2 Unsigned-8 4-20mA factory calibration: 250 (useless) N
4-20mA user calibration: 250 (useless)
Temperature compensation (total number of
pressure points): 1~21
Calibration point number N1
Pressure factory calibration: 0~S1-1
Pressure user calibration: 0~S1-1
3 Unsigned-8 4-20mA factory calibration: 0~S1-1 N
4-20mA user calibration: 0~S1-1
Temperature compensation (temperature point
serial number): 0~S1-1
Calibration point number N2
Pressure factory calibration: 250 (useless)
Pressure user calibration: 250 (useless)
4 Unsigned-8 4-20mA factory calibration: 250 (useless) N
4-20mA user calibration: 250 (useless)
Temperature compensation (pressure point serial
number):0~S2-1
Unit code U1
5 Enum N
See Appendix 1 "Unit Code".
Calibration point value V1
Pressure factory calibration: sensor voltage value
Pressure user calibration: measured pressure
value
6-9 Float 4-20mA factory calibration: measured current N
value
4-20mA user calibration: measured current value
Temperature compensation: temperature point set
point
Unit code U2
10 Enum N
See Appendix 1 "Unit Code"
11-14 Float Calibration point value V2 N
4
Pressure factory calibration: calibration pressure
value
Pressure user calibration: ideal pressure value
4-20mA factory calibration: ideal current value
4-20mA user calibration: ideal current value
Temperature compensation: Pressure point
measurement
note:
Read pressure set point:
When T=4 in the request frame andN1=250When, it means that the pressure set point of
temperature compensation is to be read. At this time, N2 means the serial number of the pressure
set point to be read, and the range is0~S2-1(S2 is the total number of pressure set points).
Can be
byte type of data value Description
changed
0 Enum Type code T N
Pressure factory calibration: 0
Pressure user calibration: 1
4-20mA factory calibration: 2
4-20mA user calibration: 3
4
Temperature compensation: 4
Total number of calibration points S1
Pressure factory calibration: 3~41
Pressure user calibration: 2~11
1 Unsigned-8 4-20mA factory calibration: 2~32 N
4-20mA user calibration: 2
Temperature compensation (total number of
temperature points): 2~9
Total number of calibration points S2
Pressure factory calibration: 250 (useless)
Pressure user calibration: 250 (useless)
2 Unsigned-8 4-20mA factory calibration: 250 (useless) N
4-20mA user calibration: 250 (useless)
Temperature compensation (total number of
pressure points): 1~21
Calibration point number N1
Pressure factory calibration: 0~S1-1
Pressure user calibration: 0~S1-1
3 Unsigned-8 4-20mA factory calibration: 0~S1-1 N
4-20mA user calibration: 0~S1-1
Temperature compensation (temperature point
serial number): 0~S1-1
Calibration point number N2
Pressure factory calibration: 250 (useless)
Pressure user calibration: 250 (useless)
4 Unsigned-8 4-20mA factory calibration: 250 (useless) N
4-20mA user calibration: 250 (useless)
Temperature compensation (pressure point serial
number):0~S2-1
Unit code U1
5 Enum N
See Appendix 1 "Unit Code".
Calibration point value V1
Pressure factory calibration: sensor voltage value
Pressure user calibration: measured pressure
value
6-9 Float 4-20mA factory calibration: measured current N
value
4-20mA user calibration: measured current value
Temperature compensation: temperature point set
point
Unit code U2
10 Enum N
See Appendix 1 "Unit Code"
11-14 Float Calibration point value V2 N
4
Pressure factory calibration: calibration pressure
value
Pressure user calibration: ideal pressure value
4-20mA factory calibration: ideal current value
4-20mA user calibration: ideal current value
Temperature compensation: Pressure point
measurement
note:
Write pressure set point:
When T=4 in the request frame andN1=250When, it means that the pressure set point of
temperature compensation is to be written. At this time, N2 means the serial number of the
pressure set point to be written, and the range is0~S2-1(S2 is the total number of pressure set
points).
4
Delimiter Address Expansion Command Bytes Data Check
Bytes Count Byte
0x82 0x00|38 bits ID NULL 142 1 enter XOR
Pressure factory
calibration: 0x00
Pressure user
calibration: 0x01
Current factory
calibration: 0x02
Current user
calibration: 0x03
Temperature
compensation: 0x04
drop out
Pressure factory
calibration: 0x80
Pressure user
calibration: 0x81
Current factory
calibration: 0x82
Current user
calibration: 0x83
Temperature
compensation: 0x84
Response frame ACK:
4
FLASH to EEPROM.
Request frame STX:
FLASH EEPROM
Pressure factory
calibration: 0x80
Pressure user
calibration: 0x81
Current factory
calibration: 0x82
Current user
calibration: 0x83
Temperature
compensation: 0x84
Response frame ACK:
4
15. Command 144 write device ID
This command is used to write the device ID (Device ID). For the same manufacturer ID
(Manufacturer ID
) And device type (Device Type), each device must have a different device ID.
Request frame STX:
16. Command 145 Fine adjustment of the upper and lower limits of the
main variable
This command is used to adjust the current reading to the upper limit (URV) or lower limit (LRV)
of the main variable.
Enter the lower limit pressure,After the reading is stable, execute this command. After execution,
the transmitter will adjust the current pressure reading to the upper limit set value.
Enter the upper limit pressure,After the reading is stable, execute this command. After execution,
the transmitter will adjust the current pressure reading to the upper limit set value.
4
Response frame ACK:
5
Fives. Schedule
1. Unit code
5
i4H2O 4.014741
m4H2O 101.9744