虎符电竞官网

关注官方微信

en

EN.

chanpinzhongxin

产品中心

Modbus网关的四种类型

发布时间:2019-09-11 作者:上海卓岚 浏览量:10216
1.概述

modbuswangguanshiyizhongnenggoujiangmodubs tcpxieyizhuanhuaweimodbus rtuxieyideshebei。modbusguangfanyingyongyuyibiaohechuanganqilingyu,keyihuodeyibiaohechuanganqideshuju,danshichuantongdejiyurs485demodbus rtu(huoascii)suduhekuozhanxingjiaocha,suoyihoulaichuxianlemodbus tcpzheizhongjiyuwangluodexieyi。suoyimodbuswangguanzheizhongzhuanhuanqijiuyingyunershengle。

sizhongmodbuswangguancongjiandanxieyizhuanhuandaoduozhujiwangguan,zaidaocunchuxingwangguan,zaidaozlmbzheizhongkepeizhiwangguan。congjiandandaofuzayeshifanyingletadefazhanguocheng,lejietamendeyouquedianyouzhuyugongchengshigenghaozhangwotamendeshiyongfangfa。

zheilitebietuijiandeshizlmbkepeizhiwangguan,takeyiyuxianpeizhixuyaoduqudeduogecongzhandeduogejicunqiliebiao,ranhouwangkoukeyiyongyitiaozhilingyicixingduqusuoyoujicunqi,duquxiaolvfeichanggao。qieduqusuduhenkuai。juticankao《kepeizhimodbuswangguanzlmb》。

2.四类Modbus网关
2.1.简单协议转化

zuichudemodubswangguan,zhibuguoshixuyaojiejueshujugeshidezhuanhua。juyigelizi,modbus rtu(rs485duan)zhong03gongnengma,duqu00kaishide1gejicunqidezhilingwei:01 03 00 00 00 01 84 0a,qizhong84 0ashicrcxiaoyan。eryigemodbus tcpzhiling(wangluoduan)wei00 00 00 00 00 06 01 03 00 00 00 01。womenzhidaoputongdechuankoufuwuqishi“touchuan”de,yejiushifasongchuankoufasong01 03 00 00 00 01 84 0a,wangkouyeshi01 03 00 00 00 01 84 0a。weileshixianzheigertuzhuanmodbus tcpgongneng,duibifaxianzhiyaoqudiaocrcxiaoyan84 0ajiashangkaitoude00 00 00 00 00 06jike。

简单协议转化的多主机冲突

zheizhongjiandandegeshizhuanhuaqueshinenggouchubudimanzuyaoqiu。danshiquedianshi:

1.wufaduozhujifangwen:bunengshixianduogemodbus tcpzhujiqufangwenwangguan,yinweizhujiahezhujibfasongdeshujuzairs485zongxianshanghuichanshengqiangzhanzongxianchongtu,yinqishujucuoluan。

2.fanhuishujuganrao:shebeiduizhujiadeyingdabujinhuifanhuijizhujiayehuifanhuijizhujib,zheiyangzhujibdefanhuishujuzhongjiuhuiyouganraoshuju。

suiranjiandanxieyizhuanhuajinbenyijingbeitaotai,zheiliyejianyaojieshaoyixiatadeshezhifangfa:zaizlvircompeizhigongjude“shebeibianji”jiemianzhongxuanzezhuanhuaxieyiwei“modbus tcpzhuanrtu”,zaigaojixuanxiangzhongqudiao“duozhuji”he“rs485fangchongtu”lianggegou。

2.2.多主机模式

duozhujimoshidemodbuswangguanzhengshiweijiejue“jiandanxieyizhuanhua”moshidequedianshejide。rushangtusuoshi,dangzhujiahezhujibtongshifangwenshimodbuswangguanhuijinxingzongxiandezhanyongdiaodu,congerjiejuezongxianchongtuwenti,lingwaizhujiafangwendeshujuyebuhuizaifasongjizhujib,jiejuelefanhuishujuganraowenti。

shujutongxunbuzhouruxia:

1.dangwangguanshoudaozhujiadechaxunqingqiushi,jianchazongxianshifouyouzaishiyong,ruguokongxianzefasongdaors485zongxianshang,fouzedengdaidaozongxiankongxian。

2.wangguanjiluxialaidangqianchaxundezhuji,zheilishizhujia。

3.dangshujucongrs485zongxianfanhuishi,wangguanjiangqizhuanhuaweimodbus tcpgeshizhuanfajixiangyingdezhuji(zheilishizhujia)。

duozhujimoshideyoudianshi,shixianleduotaizhujidetongshifangwen,jiejuelezongxianchongtuhefanhuishujuganraowenti,danshirengrancunzaibuzuzhichu:

1.shujufanhuiman:congyishangdeshujutongxunbuzhoukeyikanchu,yitaizhujihuodeshujuxuyaoshujuxiancongwangluozhuanfadaors485zongxian,dengdaishebeifanhuihouzaicongrs485zhuanfadaowangluo。youyurs485zongxianbenshenshimansutongxinfangshi,zhujiyibanxuyaodengdai50~100mscainenghuodeyigeshuju。

2.zhujishulianghenduoshi,dengdairongyichaoshi:zheiyeshishujufanhuimanyinqidelingwaiyigewenti。

duiyuzaoqidezlan5142morenji“duozhujimoshi”;duiyuzlan5143(1.565zhiqianbanben)buzhichi“duozhujimoshi”,zhizhichi“cunchuxing”;duiyuyuzlan5143(1.565jiqizhihoubanben)zhichi“duozhujimoshi”,shezhifangfawei:zaizlvircompeizhigongjude“shebeibianji”jiemianzhongxuanzezhuanhuaxieyiwei“modbus tcpzhuanrtu”,zaigaojixuanxiangzhongjiangrs485zongxianchongtuzuiduodengdaishijiangaiwei2miaojike。

2.3.存储型网关

cunchuxingwangguanzhengshiweilejiejue“duozhujimoshi”dequedianershejide,youyu“duozhujimoshi”demansuwentizhuyaoshiyouyurs485zongxianfanhuishujutaimanyinqide,“cunchuxing”desilujiushitongguoyuxianhuodemouxiexuyaodeshuju,shixiancunchuqilai,dengwangluoduanxuyaoshujushikeyilijitigong,congerjianshaoshujuchaxunshijian。

cunchuxingwangguanyoulianggetedian:

1.zixuexi:cunchuxingwangguanwuxupeizhi,yinweitakeyizaizhujisuoyaoyigechaxunshujudeshihoujiuhuijiangzheigejilubaocunyiqi,wangguanneibuhuizidongxuexidangqianwangkouxuyaodeshuju。

2.shixianchaxun:dangwangguanhuoxisuoyouzhujisuoyaodesuoyoudejicunqizhihou,wangguanhuishixianjinxingzhutiaochaxun,bingbajieguocunchudaowangguandeneibu。

ruciyilai,dangzhujiaxiangyaozhiqianyaoguodeshujudeshihou,wangguanhuicongzijideneicunzhongdiaoqushuju,binglijifanhuijizhujia,youyumeiyouzhuanfadaors485zongxiandeguocheng,zheigeshijiandayuezai1~2ms,bizhiqiande50~100msdadatigao。

cunchuxingwangguandeyoudian:

1.fanhuisudukuai:zhujiachaxunfanhuishujushijiandadatigao。

2.wuxupeizhi:youyucaiyongzixuexifangshi,wuxupeizhi,caozuoqilaihe“duozhujimoshi”bingmeiyouchabie。

cunchuxingwangguandewenti:

1.shoutiaozhilingfanhuiman:youyuwangguanshitongguoxuexilaihuodezhujisuoyaodejicunqihaode,zaihuodezheigexinxiqian,wufashixianchaxun。suoyizhujifasongdediyitiaozhilingrengranxuyaotongguozhuandaors485zongxianlaihuodeshuju。shoutiaozhilingfanhuiheduozhujimoshiyiyangman。

2.rs485zongxianchaxunguokuaikenengyingxiangshebeigongzuo:youyuyibanmorenqingkuangxiars485zongxianhuiyizuikuaisudesuduchaxuncongzhanshebeineibudejicunqineirong,ermouxieyibiaokenengwufashiyingzheimekuaisudechaxundaozhishebeigongzuoyichang。duiyuzheidianshijikeyijiada“rs485zongxiankongyushijian”canshulaijiejuechaxunguokuaidewenti,shijishikeyijiejuede。

3.bushizuixinshuju:youyushujushishixianchaxunhuode,cunchuqilaide,suoyichadaodeshujukenengbingbushizuixindeshuju,suiranzheigeshijianyejiuzhiyoujibaihaomiao,duiyumouxieteshuqingkuangyexuyaokaolvdaozheizhongyanshi。

4.shixuwenti:mouxiemodbus tcpdeduquhecunchuxuyaoanzhaoxie、dudengshixucaozuode,“cunchuxing”dezheizhongyuxiancunchuhuidaluanzheizhongshixu,huiyinqimouxieshebeiwufajianrongdewenti。

zheilidequedian2、3、4doukeyichehuidao“duozhujimoshi”dewangguanlaijiejuezheigewenti,zhuyichehuidao“duozhujimoshi”hou,shujufanhuihuibianman。zhuyizlan5143dexingujianzhichi“duozhujimoshi”he“cunchuxing”liangzhongmoshi。ershangshuquedian1(shoutiaozhilingfanhuiman),jianghuizaihoumiande“kepeizhi”wangguanzhongjiejue。

zlan5142buzhichi“cunchuxing”,zlan5143shezhiwei“cunchuxing”defangfawei:zaizlvircompeizhigongjude“shebeibianji”jiemianzhongxuanzezhuanhuaxieyiwei“modbus tcpzhuanrtu”jike。

2.4.可配置网关

weilejiejue“cunchuxing”wangguandeshoutiaozhilingfanhuimandewentikeyicaiyongkepeizhiwangguan。kepeizhiwangguanyecaiyong“cunchuxing”wangguandeshixianchaxunhuoders485zongxiancongzhanjicunqineirongdebanfa。danshitabucaiyongzixuexidefangfa,weilejiejueshoutiaozhilingfanhuimandewenti,bixushixianbaxuyaodejicunqiliebiaopeizhidaowangguanneibu。takeyiyuxianpeizhimodbus rtuduandeshebeidedizhi、gongnengmahejicunqiliebiao,bingcunchudaowangguanneibu。wangguanhuizidongcaijizheixiepeizhidertushebeideshuju,ranhouyingshedaolianxudemodbus tcpjicunqidizhi,congeryunxumodbus tcpduanyicixingduqusuoyoudeshebeidebutongjicunqideshuju。

zhuolankepeizhiwangguanyouchengzhiweizlmbwangguan,youruxiadeyoudian:

1.suoyouzhilingfanhuisududoukuai:jishishishoutiaozhilingyetongyangkuaisu。

2.zhilinghebingtigaoxiaolv:keyijiangfensandebutongdezhandizhi、jicunqiyingshedaotongyipianjicunqi。zheiyangmodbus tcpduankeyiyongyitiaozhilingcaijisuoyoushuju,baokuobutongzhandizhideshebeideshuju,erbushifenweijitiaozhilingfenbiequcaiji,tigaolemodbus tcpduandechuanshuxiaolv。

3.dizhizhongyingshe:duiyumouxieqingkuangxuyaojiangbutongfensandejicunqizhongxinyingshedaozhengpianlianxudequyu,zlmbwangguankeyishixianzheigeyaoqiu。

kepeizhiwangguandequedian:

1.xuyaoshoudongpeizhi:ruguo“cunchuxing”wangguanjiunenggoumanzuyaoqiudekeyiyouxianxuanze“cunchuxing”,yinwei“cunchuxing”wuxurenhepeizhi。zlmbfangshixuyaoshoudongshiyongzlvircompeizhixuyaodejicunqi。

2.shixianyuduquyinqidewenti:hecunchuxingyiyangcunzai“bushizuixinshuju”he“shixuwenti”。

zhuolanzlan5143、zlan7144、zlan7146、zlan8303dengdouzhichikepeizhimodbuswangguangongneng。qizhongzlan5143xuyaogujianbanben1.579jiyishangbanben,peihezlvircom5.15jiyishangbanbenlaishiyong。7144xuyaogujianbanben1.491jiyishangbanben。peizhifangfashi:zaizlvircompeizhigongjude“shebeibianji”jiemianzhongdianji“gujianhepeizhi”anniu,ranhouzaidanchude“wangyechengxuxiazaigongju”duihuakuangzhong,xuanze“wangyemuluxiazai”,ranhoudianji“zlmb”anniu,shejiwanbihoudianji“xiazai”anniuxiazaidaoshebeineirong。jutineirongqingcankao《kepeizhimodbuswangguanzlmb》dexiangxijieshao。

3.四类网关比较

综上分析我们将最后的比较结果列出表格如下:

网关类型 简单协议转化 多主机模式 存储型网关 可配置网关
多主机支持
返回指令快
首条指令返回快
不存在预先读取引起的问题
无需配置
支持指令和合并和重新映射地址

zongdelaishuo,kepeizhiwangguanshiduquxiaolvzuigaode,zuiweixianjindemodbuswangguan,danshipeizhijiaoweifansuo;ercunchuxingwangguanshimorendemoshi,yeshishiyongzuijianbiandemoshi,tongshijuyouduozhuji、duqusudukuaidengtedian;erzaimouxiers485shebeibushiying“yuxianduqu”zheizhongdeqingkuangxia,keyituihuidao“duozhuji”moshizheizhongmansumoshi。er“jiandanxieyizhuanhua”moshiyouyucunzaiduozhujishiyouzongxianwumahediushi,yibanqingkuangbuhuicaiyong。

4.型号和支持的模式

sizhongmodbuswangguanmoshiheduiyingdexinghaoxianliechudaoruxiabiao:

名称 型号 简单协议转化 多主机模式 存储型网关 可配置网关
多串口Modbus网关 ZLAN5240、ZLAN5443A、ZLAN5843A、ZLAN5G40A
单串口Modbus网关 ZLAN5142、ZLAN5142-3
新一代多串口Modbus网关 ZLAN5443D、ZLAN5443-232
以太网Modus网关 ZLAN5143
Wifi+以太网Modus网关 ZLAN7144
Wifi Modus网关 ZLAN7146
4G+以太网Modbus网关 ZLAN8303-7
Zigbee Modbus网关 ZLAN9543
Lora Modbus网关 ZLAN9743