关于376.1规约的理解

376.1报文都是以16进制进行传输,链路层的传输顺序都是低位在前、高位在后,控制域例外,需要转换成2进制,然后在翻转过来。

 

以下以点抄(日冻结正向有功总电能)二类F1数据为例进行剖析:

 

主站发送报文:

 

68 56 00 56 00 68 4B 73 08 10 00 0C 0D E3 02 01 01 00 29 11 11 00 22 35 0130 00 A9 16

报文解析:

68                                                    //帧起始符

56 00 56 00                                      //长度L0056→BIN:0000000001010110,最右两位为10代表376.1-2009规约,为01代表05规约;从右第三位起,转换成10进制,代表用户数据长度,这里为:21; 其实就是用户数据区的数据长度转换到二进制 比如说是110010 然后左移两位成为11001000 转换到十六进制然后+2 就可以了

68                                                    //帧起始符

4B                                                   //控制域CDIR=0,代表主站发送;PRM=1,报文来自启动站;ACD=0CID=11

73 08 10 00                                      //行政区划:0873,终端地址:0010

0C                                                   //0C→BIN:00001100,主站地址和组地址标志

0D                                                   //应用层功能码AFN0D,请求二类数据(历史数据)

E3                                                   //帧序列域

02 01                                               //信息点DA0102:第一组第二个点,即测量点2             

01 00                                               //数据标志:FN=0001,二类F1数据:正向有功数据块

29 11 11                                          //数据时标,111129

00 22 35 01 30 00                                    //00:启动帧帧号计数器PFC22 35 01 30:启动帧发

送时标,3013522秒;00:允许传输延时时

A9                                                   //帧校验和

16                                                     //帧结束符

 

终端有效回复报文:

 

68 C2 01 C2 0168 88 73 08 10 00 0C 0D E302 01 01 00 29 11 11 19 01 30 11 11 04 00 95 12 24 00 00 95 12 24 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 EE EE EE EE EE EE EE EE EE EE EE EE EE EEEE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EEEE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE EE 00 22 35 01 30 00B4 16

运用上述方法,进行裂解,解析如下:

68

C2 01 C201

68

88

73 08 10 00

0C

0D

E3

02 01

01 00

29 11 11                                                  //数据时标,111129

19 01 30 11 11                                  //终端抄表时间,11年11月30日1190

04                                                    //费率数:4

00 95 12 24 00                                  //正向有功总电能示值:000024129500,整数位6位,

小数位4位,2412.95kWh

00 95 12 24 00                                  //费率1正向有功总电能示值

00 00 00 00 00                                  //费率2正向有功总电能示值

00 00 00 00 00                                  //费率3正向有功总电能示值

00 00 00 00 00                                  //费率4正向有功总电能示值

EE EE EE EE                                  //正向无功总电能示值

EE EE EE EE                                  //费率1正向无功总电能示值

EE EE EE EE                                  //费率2正向无功总电能示值

EE EE EE EE                                  //费率3正向无功总电能示值

EE EE EE EE                                  //费率4正向无功总电能示值

EE EE EE EE                                  //一象限无功总电能示值

EE EE EE EE                                  //费率1一象限无功总电能示值

EE EE EE EE                                  //费率2一象限无功总电能示值

EE EE EE EE                                  //费率3一象限无功总电能示值

EE EE EE EE                                  //费率4一象限无功总电能示值

EE EE EE EE                                  //四象限无功总电能示值

EE EE EE EE                                  //费率1四象限无功总电能示值

EE EE EE EE                                  //费率2四象限无功总电能示值

EE EE EE EE                                  //费率3四象限无功总电能示值

EE EE EE EE                                  //费率4四象限无功总电能示值

00 22 35 01 30 00                                    //00:启动帧帧号计数器PFC22 35 01 30:启动帧发

送时标,3013522秒;00:允许传输延时时

B4                                                   //帧校验和

16                                                     //帧结束符

你可能感兴趣的:(关于376.1规约的理解)