摘要
针对Ethercat主站需要专用硬件或者特殊网卡驱动的问题,提出了一种在windows平台上利用套接字实现Ethercat主站的方法。首先对协议栈进行模块化设计;然后分析了Ethercat协议在UDP/IP协议上的报文规范,并实现了主站对从站的读写;在此基础上设计了协议栈自动配置从站的方法;最后采用wireshark软件抓取通信数据包,实验结果表明:设计的协议栈能够实现对从站的配置及数据交换,验证了协议栈的正确性。
In view of the problem that the Ethernet master station needs special hardware or special network card driver,this paper puts forward a method to realize the Ethernet master station by using socket on Windows platform.Firstly,the protocol stack is modularized;Then it analyzes the packet specification of EtherCAT protocol in UDP/IP protocol,and realizes the reading and writing of master station to slave station;On this basis,the method of protocol stack automatic configuration slave station is designed;Finally,Wireshark software is used to capture the communication packets.The experimental results show that the designed protocol stack can realize the configuration and data exchange of the slave station,and verify the correctness of the protocol stack.
作者
柳青
LIU Qing(Beijing Polytechnic,Beijing100176,China)
出处
《机电产品开发与创新》
2021年第5期14-15,18,共3页
Development & Innovation of Machinery & Electrical Products
基金
北京电子科技职业学院多端口Ethercat主站及其同步方法研究项目(编号2021Z039-KXY)资助。