虎符电竞官网

关注官方微信

en

EN.

chanpinzhongxin

产品中心

RTU做主站的Modbus网关

发布时间:2019-09-17 作者:上海卓岚 浏览量:7556
1.RTU做主站的问题

tongchanglaishuomodbuswangguandewangkoujiezhuzhan,wangkoucaiyongmodbus tcpxieyi,chuankoujiegezhongrs485deyibiao,chuankoucaiyongmodbus rtuxieyi。danshiyeyoushaoliangqingkuangshichuankoude(rs485)zuoweizhuzhanxuyaohuodemodbus tcpcongzhandeshuju,ruxiatusuoshi:

RTU做主站的结构示意图

youyumodbus rtuhemodbus tcpdexunzhifangshibutong,putongdefangshiwufashixianzheizhonggongneng。rtuyibantongguomodbus rtuzhilingdediyigezijiezuoweizhandizhi,biru01 03 00 00 00 01 84 0a dediyigezijie01jiushizhichaxunzhandizhi1,suoyours485zongxianshangfei01dizhideshebeidoubuhuiyingda。danshidangmodbus tcpxieyiyouyucaiyongtcplianjiezuoweibangdingzhuzhanhecongzhandeniudai,buzaixuyaocongzhandizhidegainian,zhiyaoshifajimodbus tcpcongzhandechaxun,tadouhuizuoyingda。tahulvele01zheigezhandizhizijie,shijishangmodbus tcpcaiyongdeshiipdizhizuoweizhanhaodeshibie。

putongdefangshirtuzhuzhandechaxunguochengruxia:

1.shouxian6lumodbuswangguande(2gezlan5143×1luhe1gezlan5443d×4lu)fenbiepeizhilianjiedao6gemodbus tcpcongzhan,dizhifenbiewei192.168.1.61、192.168.1.62、192.168.1.63~192.168.1.66。modbus rtuzhuzhanders485he6lumodbuswangguanders485lianjiezaiyiqi。

2.modbus rtuzhuzhanplcxiangrs485zongxianfasongzhiling3d 03 00 00 00 01 81 36。

3.suoyoude6lumodbuswangguandouhuishoudao3d 03 00 00 00 01 81 36,bingqiedouzhuanhuaweimodbus tcpgeshideshuju00 00 00 00 00 06 3d 03 00 00 00 01,fenbiefaji192.168.1.62、192.168.1.63~192.168.1.66。

4.suiran00 00 00 00 00 06 3d 03 00 00 00 01zhilinglimianyeyou3dzheigedizhiziduan(shiliujinzhi3djiushi61),danshimeigemodbus tcpcongzhanbuhuiguanxinzheigezhandizhi,suoyoudecongzhandouhuijichuyingda。

5.6lumodbuswangguanjihutongshishoudaomodbus tcpcongzhandeyingda,bingtongshifasongdaors485zongxian,chanshenglezongxiandechongtu,shujucuoluan。

yishangfangandezuizhongjieguoshiyouyushujuchongtuhewufashiyong。

2.RTU做主站的方案

genjushangyijiedefenxiguanjiandewentizaiyumodbus tcphertudecongzhanshibiefangshibutong,qianzheshiipdizhi,houzheshizhandizhi。womenwufaxiugairtuzhuzhanplcdexieyiyewufaxiugaimodbus tcpcongzhandexieyi。suoyixuyaozaimodbuswangguanneibuzuozheizhongdizhizhuanhuan。

jutideshixianfangfashi:jiangmodbus tcpcongzhandeipdizhidezuihouyigeziduanzuoweimodbus rtudezhandizhi。suoyiweilefangwen192.168.1.62、192.168.1.63~192.168.1.66,rtuzhuzhanfasongdezhilingyinggaifenbieduiyingzhandizhi61、62、63~66,ji:3d 03 00 00 00 01 81 36、3e 03 00 00 00 01 81 05deng。

modbuswangguanzaishoudaors485zongxianzhilinghouhuishibiezhandizhi,ruguozhandizhihezijilianjiedemodbus tcpdeipdizhizuihouyigeziduanxiangtongzezhuanfa,fouzebuzuozhuanfa。yejiushixuyaoyouyigexiaodedingzhigongneng。

youlezheigedingzhigongnenghou,zaianzhaozhiqiandetongxunbuzhouyunxingshi,youyuxianzaizhiyouyilumodbuswangguanzhuanfaleshuju,xiangyingdeyejiuzhiyouyilufanhuishujuzhuanfadaors485zongxianshang,bimianlechongtu。

3.具体实现步骤

weileshixianzheigexiaodedingzhigongneng,xuyaocongzhuolanneibianhuode“rtuzuozhuzhan”depeizhiwenjian,jiangqixiazaidaoshebeineibu,zhongxinshangdianjike。

4.多目的连接

zaishijideshiyongchanghezhongyoubitu1gengweiyouxiaodefangfa,jimeigemodbuswangguankeyilianjie6gemudeip,suoyiyishangtu1,zhixuyaoyitaizlan5143jikeshixian,zhibuguoxuyaopeizhiewaide5gemudeipfenbielianjiedao192.168.1.62、192.168.1.63~192.168.1.66。

“rtuzuozhuzhan”dedingzhigongnenghuishibielianjiedeipdizhi,mudeipdizhizuihouyigezijiehertucongzhandizhibutongbuhuizhuanfa,suoyiyekeyiyongdantaimodbuswangguanshixian6gemodbus tcpcongzhandechaxun。