您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 冶金工业 > 华高E3监控上位机协议V1
华高电力电源监控E3上位机通信协议第1页共9页温州华高电气有限公司电话:0577-86509098传真:0577-865090681概述本文所叙述的通信协议仅适用于本公司所生产的电力电源监控系统E3系列版本的产品。物理接口:E3系列监控同时提供RS232和RS485通信接口,用户可任意选择其中之一与后台设备联机,注意,若选用RS485接口连接到电脑串行通信口,则需外加一个RS485-RS232转换头转接。通信波特率支持1200bps、2400bps、4800bps和9600bps四种速率。每一帧由10位(1位起始位,8位数据位,1位停止位,无校验位)组成。在开始通信前,请先设定好监控系统的通信参数,如通信地址、通信速率和通信协议。通信地址从1到99可选。若用户选用ModBus规约,建议远程终端下发命令的时间间隔在5秒钟以上,波特率越低时间应适当延长。在今后的产品升级过程中,本通信协议若有修改,恕本公司不另行通知,请及时垂询本公司或访问本公司网站。2ModBus协议2.1遥测遥测1下传:定义地址功能码STARADDR数据长度CRC校验数据ADDR03H0000HLENCRC16字节数11222ADDR:监控设备地址。STARTADDR为一特定值,不可随便更改。数据长度:指请求设备返回的遥测数据长度。发送时高位在前,低位在后,不可超过指定长度(0x20)。CRC校验:采用CRC16校验法,发送时低位在前,高位在后,计算方法请参阅下面章节。遥测返回:定义地址功能码长度返回数据CRC校验数据ADDR03H“数据长度”DATACRC16字节数111LEN*22遥测1返回DATA定义:寄存器地址定义传输方式放大系数单位0000交流线电压UabH—L10V0001交流线电压UbcH—L10V0002交流线电压UacH—L10V0003合母电压H—L10V0004控母电压H—L10V0005控母电流H—L10A0006电池电压H—L10V0007电池电流H—L10A0008环境温度H—L10℃华高电力电源监控E3上位机通信协议第2页共9页温州华高电气有限公司电话:0577-86509098传真:0577-865090680009第01节单体电池电压H—L100V000A第02节单体电池电压H—L100V000B第03节单体电池电压H—L100V……0020第24节单体电池电压H—L100V2.2遥信遥信下传:定义地址功能码STARADDR数据长度CRC校验数据ADDR02H7000HLENCRC16字节数11222数据长度指遥信量长度,1个字节包含8个遥信量。遥信返回:定义地址功能码数据长度返回数据CRC校验数据ADDR02H(LEN+7)/8DATACRC16字节数1112注:0为备用,1为工作;0为浮充,1为均充;0为正常,1为故障;0为开机,1为关机。寄存器地址字节Bits定义7000HBit0系统总故障Bit1电池充电方式Bit2~Bit7未定义LBit0-Bit71~8号充电模块开关机7001HBit0-Bit71~8号充电模块通信故障LBit0-Bit71~8号充电模块故障7002HBit0交流停电Bit1交流缺相Bit2交流欠压Bit3交流过压Bit4-Bit7未定义LBit0合母电压过高Bit1合母电压过低Bit2控母电压过高Bit3控母电压过低Bit4电池组欠压Bit5电池组过流Bit6-Bit7未定义7003HBit0防雷器故障Bit1熔断器故障Bit2母线绝缘超差Bit3支路开关跳闸Bit4母线绝缘下降Bit5-Bit7未定义LBit0-Bit7未定义7004HBit0-Bit7未定义LBit0-Bit7未定义华高电力电源监控E3上位机通信协议第3页共9页温州华高电气有限公司电话:0577-86509098传真:0577-865090687005HBit0巡检仪通信故障Bit1绝缘仪通信故障Bit2-Bit7未定义LBit0-Bit71-8号单体电池过压7006HBit0-Bit79-16号单体电池过压LBit0-Bit717-24号单体电池过压7007HBit0-Bit71-8号单体电池欠压LBit0-Bit79-16号单体电池欠压7008HBit0-Bit717-24号单体电池欠压LBit0-Bit71-8号单体电池差压7009HBit0-Bit79-16号单体电池差压LBit0-Bit717-24号单体电池差压700AHBit0-Bit7绝缘支路1~8故障LBit0-Bit7绝缘支路9~16故障700BHBit0-Bit7绝缘支路17~24故障LBit0-Bit7绝缘支路25~32故障700CHBit0未定义Bit1-Bit7未定义LBit0-Bit7未定义2.3遥调遥调下传:定义地址功能码DATAREGVALUECRC校验数据ADDR06HDATACRC16字节数11222DATAREG定义:(高位在前,低位在后)DATAREG遥调内容单位系数设定范围7100H浮充电压,(低位在前,高位在后)V10100~3207200H均充电压,(低位在前,高位在后)V10110~320遥调返回:定义地址功能码DATAREGVALUECRC校验数据ADDR06HDATACRC16字节数112222.4遥控遥控下传:定义地址功能码遥控编号VALUECRC校验数据ADDR0FH78XXHDATACRC16字节数11222遥控编号遥控内容DATA7800H~7807H01~8号模块开关机控制0=开机,1=关机7808H电池均浮充控制0=浮充,1=均充华高电力电源监控E3上位机通信协议第4页共9页温州华高电气有限公司电话:0577-86509098传真:0577-86509068举例:控制#2号模块关机:发送命令:010f78010001控制#2号模块开机:发送命令:010f78000000遥控返回:定义地址功能码遥控编号VALUECRC校验数据ADDR0FH78XXHDATACRC16字节数112222.5错误返回:定义地址功能码CODECRC校验数据ADDRCOM+80H1CRC16字节数11122.6CRC16校验码计算方法CRC添加到消息中时,低字节先加入,然后高字节。CRC简单函数如下:unsignedshortCRC16(puchMsg,usDataLen)unsignedchar*puchMsg;/*要进行CRC校验的消息*/unsignedshortusDataLen;/*消息中字节数*/{unsignedcharuchCRCHi=0xFF;/*高CRC字节初始化*/unsignedcharuchCRCLo=0xFF;/*低CRC字节初始化*/unsigneduIndex;/*CRC循环中的索引*/while(usDataLen--)/*传输消息缓冲区*/{uIndex=uchCRCHi^*puchMsgg++;/*计算CRC*/uchCRCHi=uchCRCLo^auchCRCHi[uIndex};uchCRCLo=auchCRCLo[uIndex];}return(uchCRCHi8|uchCRCLo);}/*CRC高位字节值表*/staticunsignedcharauchCRCHi[]={0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,华高电力电源监控E3上位机通信协议第5页共9页温州华高电气有限公司电话:0577-86509098传真:0577-865090680x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40};/*CRC低位字节值表*/staticcharauchCRCLo[]={0x00,0xC0,0xC1,0x01,0xC3,0x03,0x02,0xC2,0xC6,0x06,0x07,0xC7,0x05,0xC5,0xC4,0x04,0xCC,0x0C,0x0D,0xCD,0x0F,0xCF,0xCE,0x0E,0x0A,0xCA,0xCB,0x0B,0xC9,0x09,0x08,0xC8,0xD8,0x18,0x19,0xD9,0x1B,0xDB,0xDA,0x1A,0x1E,0xDE,0xDF,0x1F,0xDD,0x1D,0x1C,0xDC,0x14,0xD4,0xD5,0x15,0xD7,0x17,0x16,0xD6,0xD2,0x12,0x13,0xD3,0x11,0xD1,0xD0,0x10,0xF0,0x30,0x31,0xF1,0x33,0xF3,0xF2,0x32,0x36,0xF6,0xF7,0x37,0xF5,0x35,0x34,0xF4,0x3C,0xFC,0xFD,0x3D,0xFF,0x3F,0x3E,0xFE,0xFA,0x3A,0x3B,0xFB,0x39,0xF9,0xF8,0x38,0x28,0xE8,0xE9,0x29,0xEB,0x2B,0x2A,0xEA,0xEE,0x2E,0x2F,0xEF,0x2D,0xED,0xEC,0x2C,0xE4,0x24,0x25,0xE5,0x27,0xE7,0xE6,0x26,0x2
本文标题:华高E3监控上位机协议V1
链接地址:https://www.777doc.com/doc-2605441 .html