x1ly514atyb02m通讯协议水冷模块机v201b4-a_第1页
x1ly514atyb02m通讯协议水冷模块机v201b4-a_第2页
x1ly514atyb02m通讯协议水冷模块机v201b4-a_第3页
x1ly514atyb02m通讯协议水冷模块机v201b4-a_第4页
x1ly514atyb02m通讯协议水冷模块机v201b4-a_第5页
已阅读5页,还剩17页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、空调系统联网方案软件功能码:x1.ly514a.ty.b02m v201b4-a一、概述1二、简写定义1三、modbus协议描述13. 1综述13. 2字符结构(&n,2)13.3 modbus数据桢13. 4 modbus协议定义的3种数据桢13.5 modbus数据桢长度制约13.6 modbus数据编码23. 7 modbus数据模型23. 8 modbus地址模型23. 9 modbus功能码23.10 public function codes 描述33. 11错误通讯时的额外应答7四、系统应用94.1、网络扑拓图94.2、网络通讯的数据94.3、通讯协议定义94.4、【读写

2、开关量】川户操作命令104.5、【只读整型量】版本信息104.6、【只读整型量】公共区信息114.7、【只读整型量】系统板的信息124.8、【只读整型量】第n (015)个模块信息144.9、【只读整型量】参数属性174. 10.【读写整型量】n组参数18、概述1.1应用范围适用于所冇邦普分体式屯脑控制系统联网监控。1.2参考资料a、modbusapplicationprotocolv 1_1 .pdfb、vfd-b使用手册c、lg变频器使用说明书d、bas通讯协议二、简写定义pdu protocol data uniti办议数据单元adu application data unit 丿

3、9;v用数据单丿i三、modbus协议描述3.1综述a. 使用modbus协议rtu类型,b. 采用rs-485多点总线型主从式结构、异步半双工方式,数据长度8位无校验位,波特率为 9600bpso (8,n,2forrtu)3. 2字符结构(8, n, 2)start01234567stopstopbilbilbitv 8-data bitsv 11 -bits character frame3. 3 modbus数据桢:协议数据单元(pdu)additonal addresserror checkfunction codedata应丿ij数据单元(adu)3.4 modbus协议定义的3种

4、数据桢modbus request pdu (请求桢):funtion_code- 1 bytel + request_data-n byiesmodbus response pdu (应答桢):fuction_code1 byte+response_data-n bytesmodbus exception pdu (额外桢):fuction_codell()x80- 1 byte+exception_code 1 byte3. 5 modbus数据桢长度制约pdu最人长度256 byteso3. 6 modbus数据编码例:发送数据0x1234,则先发送0x12,再发送0x34。3. 7 m

5、odbus数据模型primary tablesobject typetype of accesscommentsdiscretes in putsingle bitread-onlythis type of data can be provided by an i/o system.coilssingle bitread-writethis type of data can be alterable by an application program.input registers16-bit wordread-onlythis type of data can be provided by

6、an i/o system.holding registers16-bit wordread-writethis type of data can be alterable by an application program3. 8 modbus地址模型数据地址从0到655353. 9 modbus功能码public function codesuser-defined function codesreserved function codes1271101007265public function codesuser-defined function codespublic function

7、 codesuser-defined function codespublic function codespublic function codes 定义:fuction codescodesub code(hex)dataaccessbit accessphysical discrete inputsread discrete inputs0202internal bits or physicalcoilsread coils0101write single coil0505write multiple coils15of16 bitsaccessphysical input regist

8、ersread input register0404internal registers orphysical output registersreadholdingregisters0303write single register0606writemultipleregisters1610read/write multipleregisters2317mask write registers2216read fifo queue2418file record accessread file record20614write file record21615diagnosticsread e

9、xception status0707diagnostic0800-18get com event counter110bget com event log12ocreport slave id1711readdeviceidentification43142botherencapsulated interfacetran sport432b3. 10 public function codes 描述(重点描述如下功能码 01. 02. 03. 04、05、06. 15、16. 23)a、01(0x01) read coils例:读01号机,地址从0x0013开始的19个开关输出信号。requ

10、estresponseaddress01haddress01hfunction01hfunction01hstarting address hi00h()x()()00byte count03hstarting address lo13hoxffffoutput status 27-20cdhnumber hiooh0x0001-output status 35-286bhnumber lo13h0x07d0output status 38-3605 hcrc chk low8chcrc chk low42hcrc chk high02hcrc chk high82hbyte count =

11、number/8 或 number/8+l(如果余数大于 0).b、02(0x02) read discrete input例:读01号机,地址从0x00c4开始的21个开关输入信号。requestresponseaddress01haddress01hfunction02hfunction02hstarting address hiooh0x0000-byte count03hstarting address loc4hoxffffinput status 204-197achnumber hi00h0x0001-input status 212-205dbhnumber lo16h0x07

12、d0gpu status 218-21335hcrc chk lowb8hcrc chk low22hcrc chk high39hcrc chk high88hbyte count = number/8 或 number/8+l(如果余数人于 0).c、03(0x03) read holing registers例:读01号机,地址从0x006b开始的3个整型变量当前值。requestresponseaddress01haddress01hfunction03hfunction03hstarting address hiooh0x0000-oxffffbyte count06hstartin

13、g address lo6bhregister hi (108)02hnumber hiooh1 0x7dregister lo (108)2bhnumber lo03hregister hi (109)oohcrc chk low74hregister lo (109)oohcrc chk high17hregister hi (110)oohregister lo (110)64hcrc chk low05 hcrc chk high7 ahbyte count = number * 2.d、04(0x04) read input registers例:读01号机,地址从0x0008开始的

14、1个整型变量当前值©requestresponseaddress01haddress01hfunction04hfunction04hstarting address hiooh()x()()()()byte count02hstarting address lo08hoxffffinput reg. hi (9)oohnumber hioohl0x7dinput reg. lo (9)0ahnumber lo01hcrc chk low39hcrc chk lowbohcrc chk high37hcrc chk high08hbyte count = number * 2.e、0

15、5(0x05) write single coil例:写01号机,地址为oxooac的一个开关输出信号。requestresponseaddress01haddress01hfunction05hfunction05houtput address hiooh0x0000output address hiooh0x0000output address loachoxffffoutput address loachoxffffoutput value hiffh0x0000 oroutput value hiffh0x0000 oroutput value looohoxffoooutput va

16、lue looohoxffoocrc chk low4chcrc chk low4chcrc chk high1bhcrc chk high1bhvalue 为()x()()0()表示 off; oxffo()表示 on。f、06(0x06) write single register 例:写 01 号机,地址为 0x0001 的一个整型变量。requestresponseaddress01haddress01hfunction06hfunction06hreg. address hiooh0x0000reg. address hi00h0x0000reg. address lo0ihoxff

17、ffreg. address lo01hoxffffreg. value hiooh0x0000reg. value hi00h0x0000reg. value lo03hoxffffreg value lo03hoxffffcrc chk low98hcrc chk low98hcrc chk high0bhcrc chk high0bhg、07(0x07) read exception status (serial line only) 例:requestresponseaddress01haddress01hfunction07hfunction07hcrc chk low41houtp

18、ut data6dh0x00oxffcrc chk highe2hcrc chk lowe3hcrc chk highddhoutput data 为 60(0110 1101b), 0 表示 off、1 表示 on。08(0x08) diagnostics (serial line only)通讯冋路测试 例:requestresponseaddress0ihaddress01hfunction08hfunction08hsub-function hioohsub-function hioohsub-function looohsub-function looohcrc chk higha5

19、hcrc chk higha5hcrc chk high37hcrc chk high37h详细说明略。i、1 l(0x0b) get comm event counter (serial line only) 略j、i2(0x0c) get comm event log (serial line only) 略k、15(0x0f) write multiple coils例:写()1号机,地址从0x0013的10个开关输出信号。requestresponseaddress01haddress01hfunction0fhfunctionofhstarting address hiooh0x00

20、00starting address hiooh0x0000starting address lo13hoxffffstarting address lo13hoxffffnumber hiooh0x000nnumber hiooh0x0001-number lo0ah0x07b0number lo0ahoxo7bobyte count02hcrc chk low24houtput value hicdhcrc chk high09houtput value lo01hcrc chk low72hcrc chk highcbhbyte count = number/8 或 number/8+l

21、(如果余数大于 0)l、16(0x10) write multiple registers 例:写 01 号机,地址从 0x0001 的 2 个整型变量。requestresponseaddress01haddress01hfunctioni0hfunction10hstarting address hiooh0x0000starting address hi00h0x0000-starting address lo01hoxffffstarting address lo01hoxffffnumber hiooh0x0001-number hiooh0x0001number lo02h0x00

22、7bnumber lo02h0x007bbyte count04hcrc chk low10hreg. value hioohcrc chk high08hreg. value lo0ahreg. value hi01hreg. value lo02hcrc chk low92hcrc chk high30hbyte count = number * 2.m、17(0x11) report slave id (serial line only)略n、20 / 6 (0x14 / 0x06) read file record 略o、21 /6(0xl5/0x06) write file reco

23、rd 略p、22 (0x16) mask write register 略q、23(0x17) read/write multiple registers 例:01 号机,读地址从 0x0001 的 2 个整型变量;写地址 从oxoooe的3个整型变暈。requestresponseaddress01haddress01hfunction17hfunction17hrstarting address hiooh0x0000byte count0chrstarting address lo03hoxffffrrcg value hioohrnumber hiooh0x0001-rreg valu

24、e lofehrnumber lo06h0x0076rreg value hi0ahwstarting address hioohrreg. value locdhwstarting address lo0ehrreg value hioohwnumber hiooh0x0001-rreg value lo01hwnumber lo03h0x0076rreg. value hioohwbyte count06hrreg. value lo03hreg value hioohrreg value hioohreg. value loffhrreg. value lo0dhreg value hi

25、oohrreg value hioohreg. value loffhrreg value loffhreg. value hioohcrc chk low1dhreg. value loffhcrc chk high79hcrc chk low46hcrc chk high91hbyte count = rnumber * 2.r、24 (ox 18) read fifo queue 略s、43 (0x2b) encapsulated interface transport 略t、43 / 14 (0x2b / oxoe) read device identification 略3. 11错

26、误通讯时的额外应答a、当数据通讯产生错误时,从机需应答错误码数据桢并h将功能码最高位设为1 (即function code+ 0x80) |n|送给主机,讣主机知道冇错误产生。如:requestresponseaddress01haddress01hfunction01hfunction81hstarting address hiooh0x0000-exception code02hstarting address lo13hoxffffcrc chk lowc1hnumber hiooh0x0001crc chk high91hnumber lo13h0x07 docrc chk low8c

27、hcrc chk high02hb、exception code 定义:codenamemeaning01illegal function功能码错误02illegal data address地址错误03illegal data value数据值错误,超出范围无法识别04slave device faluc从机无法处理,05ackno wledge06slave device busy08memory parity error0agateway path unavailable0bgateway target device failed to respondc、编码流程图:讲入四、系统应用采用

28、modbus rtu协议4.1、网络扑拓图4.2、网络通讯的数据dm23(最好是 根据操作 上的需求 进行通 讯)或pc机-取参数与属性(03或04)ly514a(主机,也 是系统板, 地址为0)修改参数(06或16)亠a.版本信息(04).机组运行信息(04),系统信息(04).模块信息(04)发命令(05或15)-4.3、通讯协议定义通讯内容地址空间功能码(16进制)操作串口操作权限基地址大小写读1234用户操作命令0x000012805 或 15版本倍息0x010032 x 1604机组信息0x050016040x06001004模块命令/信息0x0700128 x n040x02005

29、12 x n02系统信息0x1700128040x000051202参数组信息0x18001 +p04参数项信息0x1900128 x p04参数值0x230032 x p06 或 1603其中:1、n为模块数,最大32个模块。每个模块信息占用50个地址。2、p为参数组数,最大20组。实际上毎组参数最大个数为32,毎个参数有4个属性值。3、表示只能操作用户参数(即笫1组和第2组参数)。4.4、【读写开关量】用户操作命令基地址:0x0000,最大命令数为32个。相对地址数据名称备注(0:无效,1:命令有效)0x00oxof常用命令b0开机命令b8复位命令b1关机命令b9消音命令b2b10取消预热

30、命令b3b11b4b12b5b13b6b14b7b15oxlooxlf备用b0b8b1b9b2b10b3b11b4b12b5b13b6b14b7b154.5、【只读整型量】版本信息基地址:0x0100,每个模块有独立的版本号,每个模块占32个字节相对地址数据名称备注0x000#模块版本号版木号使用acsii字符表示0x101#模块版木号 4.6、【只读整型量】公共区信息第一段信息:系统信息基地址:0x0500相对地址数据名称备注0x00机组状态(0:无效,1:有效)b0机组待机态b8机组预热b1机组正在启动中b9机组冇故障b2机组运行态b10机组防冻b3机组正在停机中b11备川b4机组严重报警

31、态b12备用b5备用b13备川b6备用b14备用b7备用b15备用0x01模块数-32700表示该项不存在0x02模块压机数0x03机型0:送水;1:送风0x04设定模式请参考参数表中的“模式设置”0x05当前运行模式0x06空调设定温度0x07热水设定温度0x08空调控制温度0x09热水控制温度oxoa热回收是否使用0:不使用;1:使用oxob模块使用设置0:不使用;1:使用bitobitl5 对应#0#15 模块oxoc-oxff备用第二段信息:辅助属性基地址:0x0600相对地址数据名称备注0x00系统可使用模式(0:不可使用,1:可使用)b0制冷b8备用b1制热b9备用b2热水b10备

32、用b3制冷+部分热水b11备用b4制冷+热水b12备用b5制热+热水b13备用b6自动b14备用b7备用b15备用0x01压机输出可使用状态和输出点位置一一对应,请参见4.8、【只读整型量】第n (015) 个模块信息(0:不使用,1:使用)0x02模块输出可使用状态0x03系统输岀可使用状态10x04系统输出可使用状态20x05压机输入可使用状态tnaa x 七 /?r:主 介 itl a o f 1 1 :* iw 粕 1 j&t、人舎 xt ( n i c 0x06模块输入可使用状态和獅人丿仗位日.刈丿宜,in多见4.x、【只以能犁恨】一弟n (0-15)个模块信息(0:不使用,

33、1:使用)0x07系统输入可使用状态10x08系统输入可使用状态20x09模块故障0:无故障;1:有故障 bit()bitl5 对应#0#15 模块4.7. 1只读整型量】系统板的信息基地址:0x1700,最大数据量为:256 (0x0100)个。相对地址数据名称备注0x00-0x09备用(总5个)oxoa输出(0:断开,1:输出)b0空调泵b8热水泵b1空调电加热b9b2水源泵b10b3冷却塔风机b11b4b12b5b13b6b14b7运行指示b15故障指示0x()b-()x()e备用输出(总5个)oxof输入(0:输入无效,1:输入有效)b0空调泵过载b8热水泵过载b1蒸发水流开关b9热水

34、水流开关b2模式选择开关b10b3b11b4b12b5线控开关b13b6b14b7外部连锁b15电源错误0x10输入(0:输入无效,1:输入有效)b0水源泵过载b8b1冷凝水流开关b9b2b10b3b11b4送风机过载b12b5送风压差b13b6b14b7b150x11-0x13备用输入(总10个)0xl40xld备用(总5个)oxle0x22备用(总16个)0x23故障(1:冇故障;0:无故障。)b0b8空调水泵过载b1电源故障b9蒸发水流不足b2eeprom数据错b10热水水流不足b3外部连锁b11热水水泵过载b4b12水源泵过载b5b13冷凝水流不足b6b14送风机过载b7b15送风压差

35、0x24b0b8b1b9b2b10b3b11b4b12b5b13b6b14b7b150x25b0b8系统空调侧出温过高b1环温探头故障b9系统空调侧出温过低b2系统蒸发出温故障b10b3系统蒸发回温故障b11系统水源侧出温过高b4b12系统水源侧出温过低b5系统冷凝出温故障b13b6系统冷凝回温故障b14b7b150x260x32备用故障(总48个)模拟量0x33环境温度单位:().1°c,另:-32702表示断路,327()3表示短路0x34系统蒸发出温同上0x35系统蒸发回温同上0x36热水水箱温度同上0x37系统冷凝出温同上0x38系统冷凝回温同上0x390x63备用4.8、【

36、只读整型量】第n (015)个模块信息基地址:0x0700,每个模块的垠大数据量:128 (0x0080)个。 即1#模块的基地址为0x0780, 2#模块的基地址为0x080(),以此类推。相对地址数据名称备注0x00-0x09备用开关量输出(总5个)oxoa1#压机输出(0:断开,1:输出)b0压机b8b1四通阀s1b9b2b10b3b11b4b12b5b13b6b14b7b15oxob2#压机输出同上oxoc备川oxod备用oxoe单元输出b0运行指示b8b1故障指示b9b2模块空调泵b10b3模块热水泵b11b4模块水源泵b12b5防冻电加热带b13b6b14b7b15开关量输入(总5

37、个)oxof1#压机输入(0:输入无效,1:输入有效)b0低压保护b8b1高压保护b9b2过载保护b10b3b11b4b12b5b13b6b14b7b150x102#压机输入同上oxll备用0x12备川0x13单元输入b0电源故障b8b1单兀蒸发水流开关b9b2单元冷凝水流开关b10b3单元热水水流开关b11b4单元空调泵过载b12单元送风压差b5单元水源泵过载b13单元送风机过载b6单元热水泵过载b14b7b15状态(总10个)故障(总16个)0x23通讯故障b0通讯故障b8b1b9b2b10b3b11b4b12b5b13b6b14b7b150x24-0x25备用0x261#压机故障b0压机低压b8b1压机高压b9压机电流传感器故障b2压机过载b10b3bub4吸气温度故障b12压机电流过大b5蒸发器入口温度故障b13b6b14b7b150x27备用0x28#压机故障同上0x290x2a备用0x2b备用0x2c备用0x2d备用0x2e单元故障b0b8b1屯源故障b9b2eeprom数据错b10b3bub4b12b5b13单元送风压差b6单元蒸发水流不足b14b7单元冷凝水流不足b

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论