最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【整理】解析HART中的命令0(Command 0):发送Command 0的数据和Command 0返回值的格式及含义

HART crifan 6284浏览 0评论

背景

HART协议中,有个Command 0,即命令0,用于从HART主(Master)设备发给HART从(Slave)设备,获取对应的设备的基本信息。

以及后来在:

【记录】继续用FrameAlyst加上HART猫测试扫描HART设备

中遇到的,想要去搞清楚对应的Command 0返回的值,对应的是哪家的HART设备,以及具体设备型号。

结果,就是去找Manufacturer ID的表格。

 

解释HART中的Command 0

下面,整理一下,关于command 0的知识.

command 0(COMMAND #0)的作用

READ UNIQUE IDENTIFIER

This is a Data Link Layer Management Command.

Returns the Expanded Device Type Code, Revision Levels, and Device Identification Number.

This command is implemented by a Field Device in both Short and Extended Data Link LayerFrame Formats.

The Device Type Code will always be returned in the expanded three byte format.

("254",Manufacturer Identification Code, Manufacturer’s Device Type Code)

The combination of Manufacturer Identification Code, Manufacturer’s Device Type Code, andDevice Identification Code make up the Unique Identifier required for the Extended Frame Formatof the Data Link Layer

Command本身的格式

【待整理:

spec081r8.2.pdf

中的PDU Frame Format

 

发送Command 0时的数据格式

从Master发送给Slave的Command 0,unpacked的,是:

FF FF FF FF FF 02 80 00 00 82
  • 前面5个FF,是preamble characters:

    • 如果是较老的设备,可以尝试,把FF的个数增加 -> 最少5个,最多20个FF

 

Command 0返回数据格式和含义

 

Command 0返回值格式

下面是去搞懂Command 0返回数据格式的过程:

1.去找官网的手册

找到 spec127r7.1.pdf 中的:

hcf spec 127 command 0 response data byte format

response data bytes for hart 7

其中只是提到了那个:

  • Common Table 1:但是在当前pdf中没有找到
  • Device Types Codes:也没找到Command Summary Specification, Section 6

2.其中关于hart的127这个文档,网上也能找到之前的版本:

(1)不错的:

http://www.niagarameters.com/SpecSheets/FM_HART_Proto.pdf

中的:

niagarameters universal hart commands command 0 resp data format

(2)相对也凑合的:

Romilly’s HART and Fieldbus Web Site

中的:

HART Rev. 5 commands (Word 97 file)

 

hart5 command 0 resp data bytes

  (3)

http://www05.abb.com/global/scot/scot211.nsf/veritydisplay/c125698f006840e9c1256b260045f2c8/$file/b080u06.pdf

中的也还行:

hart command 0 read transmitter unique identifier

 

(4)

HART规范:SPEC-127-通用命令00-19.pdf

中,也有command 0的解释,但是格式很不清楚。

2.所以就去找对应的

Command Summary Specification

最后找到了,是:spec099.r9.0.pdf

table 13 field device identifying data

但是很明显,还是无法找到,id表,其中包含上面看到的26表示ABB的那个表。

然后接着就是去搞清楚:

【整理】HART中Command 0返回值中的设备厂商的ID所对应的厂商是哪些

 

Command 0返回值解析

下面,就通过几个实际的例子,来解析在发送了HART的Command 0,即:

16进制值:FFFFFFFFFF0280000082

之后,所得到的Command 0的返回值,所对应的含义:

返回值字节序号

返回的十进制的值

对应的16进制值

对应的项

对应的值

值所代表的的含义

-1

FF

-1

FF

-1

FF

-1

FF

6

06

-128

80

0

00

14

0E

0

00

69

45

0

-2

FE

Device Type Code For Extension

254

扩展expansion

1

54

36

Manufacture Identification Code

36

厂商是yamatake

2

2

02

Manufacture Device Type

2

HART设备对应设备类型编号,在yamatake中是2

3

5

05

Number of Request Preambles

5

5个前导符

4

5

HART Protocol Major Version Number

5

HART协议版本是5

5

2

02

Device Revision

13

设备版本是13

6

13

0D

Software Revision

1

软件版本是1

7

1

01

Hardware Revision

3

硬件版本是3

8

3

03

Device Function Flags

3

二进制==11 b

同时具有:

·         Multiple sensor device

·         EEPROM control required

9

43

2B

Device ID Number

2B F5 AE

设备ID 2B F5 AE

10

-11

F5

11

-82

AE

12

122

7A

Minimal number of preambles to be sent with response message from slave to master

122

 

另外还有几个command 0的返回数据,暂时就不分析了。

有空再分析。

[-1, -1, -1, -1, 6, -128, 0, 24, 0, 64, -2, 10, -45, 5, 7, 1, 1, 12, 1, 1, -122, -32, 5, 0, 0, 20, 0, 96, 65, 96, 65, -127, 1, 0, 0, 0, 0, 0,

 

参考资料

HART Over RS485/RS232

Universal HART Commands

The HART message structure

转载请注明:在路上 » 【整理】解析HART中的命令0(Command 0):发送Command 0的数据和Command 0返回值的格式及含义

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.143 seconds, using 22.22MB memory