《電子技術(shù)應(yīng)用》
您所在的位置:首頁(yè) > 通信與網(wǎng)絡(luò) > 設(shè)計(jì)應(yīng)用 > 基于EtherCAT總線(xiàn)的Modbus-RTU主站網(wǎng)關(guān)設(shè)計(jì)
基于EtherCAT總線(xiàn)的Modbus-RTU主站網(wǎng)關(guān)設(shè)計(jì)
網(wǎng)絡(luò)安全與數(shù)據(jù)治理
王永峰,,康晉菊,,胡嘯,,張彪,,封成玉
中電智能科技有限公司
摘要: EtherCAT在國(guó)內(nèi)工控領(lǐng)域被廣泛應(yīng)用,,國(guó)內(nèi)許多工業(yè)現(xiàn)場(chǎng)采用EtherCAT總線(xiàn)作為控制系統(tǒng)總線(xiàn),。Modbus也是一種標(biāo)準(zhǔn)開(kāi)放的通信協(xié)議,許多儀器儀表,、傳感器,、變頻器支持Modbus協(xié)議,作為Modbus從設(shè)備被大量地應(yīng)用于工控現(xiàn)場(chǎng),。為了解決工控現(xiàn)場(chǎng)EtherCAT總線(xiàn)與Modbus設(shè)備通信問(wèn)題,,設(shè)計(jì)了一種基于EtherCAT總線(xiàn)的Modbus-RTU主站網(wǎng)關(guān)模塊,實(shí)現(xiàn)EtherCAT總線(xiàn)與Modbus協(xié)議的轉(zhuǎn)化,。該模塊對(duì)外支持2路RJ45接口和1路DB9接口,,其中RJ45接口支持EtherCAT協(xié)議,DB9接口支持Modbus-RTU主協(xié)議,。模塊通過(guò)2路RJ45接口靈活應(yīng)用于EtherCAT網(wǎng)絡(luò)中,,可以配置鏈型和環(huán)型拓?fù)浣Y(jié)構(gòu)。
中圖分類(lèi)號(hào):TP273文獻(xiàn)標(biāo)識(shí)碼:ADOI:10.19358/j.issn.2097-1788.2024.06.006
引用格式:王永峰,,康晉菊,,胡嘯,等.基于EtherCAT總線(xiàn)的Modbus-RTU主站網(wǎng)關(guān)設(shè)計(jì)[J].網(wǎng)絡(luò)安全與數(shù)據(jù)治理,,2024,,43(6):42-46,52.
Design of Modbus-RTU master station gateway based on EtherCAT bus
Wang Yongfeng, Kang Jinju, Hu Xiao, Zhang Biao, Feng Chengyu
Intelligence Technology of CEC Co.,Ltd.
Abstract: EtherCAT is widely used in the field of industrial control in China, and many industry fields use it as the control system bus. Modbus is also a standard and open communication protocol, many instruments, sensors, and frequency converters support the Modbus protocol, as Modbus slave device is widely used in industrial control sites. In order to solve the communication problem between EtherCAT bus and Modbus equipment in industrial control field, a Modbus-RTU master station gateway module based on EtherCAT bus is designed, which realizes the conversion between EtherCAT bus and Modbus protocol. The design supports two RJ45 interfaces and one DB9 interface, the RJ45 interface supports the EtherCAT interface protocol, and the DB9 interface supports the Modbus-RTU main protocol. The design can be configured with chain and ring topologies structure through two RJ45 interfaces, so it can be flexibly applied in EtherCAT networks.
Key words : EtherCAT; Modbus-RTU master station ;protocol conversion; topological structure

引言

隨著現(xiàn)場(chǎng)總線(xiàn)技術(shù)的不斷發(fā)展,各種總線(xiàn)協(xié)議層出不窮,,目前已經(jīng)有20多種總線(xiàn)協(xié)議被納入IEC61158標(biāo)準(zhǔn)[1],。由于不同的廠商設(shè)備采用不同的標(biāo)準(zhǔn)協(xié)議,因此用戶(hù)會(huì)遇到設(shè)備總線(xiàn)不配套不兼容的問(wèn)題[2],。本文針對(duì)EtherCAT和Modbus總線(xiàn)進(jìn)行研究,,設(shè)計(jì)了一種EtherCAT和Modbus總線(xiàn)協(xié)議轉(zhuǎn)換的網(wǎng)關(guān)模塊,解決工控現(xiàn)場(chǎng)EtherCAT總線(xiàn)與Modbus設(shè)備通信問(wèn)題 [3],。

目前市面上有許多關(guān)于EtherCAT與Modbus總線(xiàn)轉(zhuǎn)化的網(wǎng)關(guān)模塊,,但模塊的EtherCAT大都采用E-BUS接口,主要適配定制的系統(tǒng)中,,其物理接口為專(zhuān)用的背板總線(xiàn)接口,,不具備通用性;或者是模塊性能不能滿(mǎn)足工控領(lǐng)域,,如波特率,、延遲時(shí)間、尋址范圍,、帶從站的能力等指標(biāo),。針對(duì)此問(wèn)題,本文設(shè)計(jì)一種基于EtherCAT總線(xiàn)的Modbus-RTU主站網(wǎng)關(guān)模塊,,實(shí)現(xiàn)EtherCAT總線(xiàn)與Modbus協(xié)議的轉(zhuǎn)化,,模塊支持標(biāo)準(zhǔn)Modbus尋址范圍和功能碼,支持診斷功能,,可以通過(guò)在線(xiàn)診斷數(shù)據(jù)判斷通信正常,、響應(yīng)超時(shí)、地址錯(cuò)誤,、CRC校驗(yàn)錯(cuò)誤等狀態(tài),,通信波特率支持1 200~115 200 b/s配置,輸入輸出區(qū)大小各為1 KB,,最多可以支持32個(gè)Modbus從站,,尋址范圍為1~247子節(jié)點(diǎn)。模塊對(duì)外接口包含2路RJ45和1路DB9接口,,其中RJ45接口支持EtherCAT協(xié)議,,可以靈活適配各種系統(tǒng)和場(chǎng)景,配置鏈型和環(huán)型拓?fù)浣Y(jié)構(gòu),,提高了模塊應(yīng)用性,;1路DB9接口為Modbus-RTU接口,支持Modbus-RTU主協(xié)議,,與Modbus從站設(shè)備相連接,。


本文詳細(xì)內(nèi)容請(qǐng)下載:

http://forexkbc.com/resource/share/2000006046


作者信息:

王永峰,,康晉菊,胡嘯,,張彪,,封成玉

(中電智能科技有限公司,北京100083)


Magazine.Subscription.jpg

此內(nèi)容為AET網(wǎng)站原創(chuàng),未經(jīng)授權(quán)禁止轉(zhuǎn)載,。