您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 项目/工程管理 > 基于EtherCAT的工业以太网主站通信协议的实现
国内图书分类号:TP273学校代码:10213国际图书分类号:681.5密级:公开工程硕士学位论文基于EtherCAT的工业以太网主站通信协议的实现硕士研究生:薛红霞导师:沙学军教授申请学位:工程硕士学科:电子与通信工程所在单位:深圳研究生院答辩日期:2012年12月授予学位单位:哈尔滨工业大学ClassifiedIndex:TN273U.D.C:681.5DissertationfortheMaster’sDegreeofEngineeringIMPLEMENTATIONOFINDUSTRIALETHERNETPROTOCOLMASTERBASEDONETHERCATCandidate:XueHongxiaSupervisor:Prof.ShaXuejunAcademicDegreeAppliedfor:MasterofEngineeringSpeciality:ElectronicsandCommunicationEngineeringAffiliation:ShenzhenGraduateSchoolDateofDefence:December,2012Degree-Conferring-Institution:HarbinInstituteofTechnology摘要-I-摘要随着工业自动化的不断进步,传统总线由于其速度慢,数据量小的缺点已经无法满足工业需求。同时,随着计算机网络的不断发展,将以太网技术应用于工业控制现场总线成为了一个重要的发展方向。EtherCAT于2003年由德国BECKHOFF自动化公司提出,它的特点是高速和高数据有效率,支持多种物理拓扑结构,并且系统组成简便。本系统主站使用带有标准以太网控制器的ARM开发板,从站使用专门的控制芯片。为了克服传统以太网MAC层的时间不确定性,EtherCAT对传统以太网协议进行了修改,使用特殊的以太网帧类型0x88A4。根据EtherCAT协议,时间关键的数据采用周期性过程数据的通信方式,非时间关键的数据采用非周期性通信方式。非周期性数据通信主要有两种方式,即通信原语和邮箱数据通信。通信原语主要用于主从站的初始配置阶段,例如基本寄存器配置,邮箱配置等。邮箱通信是应用层通信方式,本文主要实现了COE协议,用于服务数据和PDO的操作。周期性过程数据通信采用逻辑寻址的方式,可以实现多播,即一个报文可以操作多个从站,每个从站取出发送给自己的数据,同时把要发送给主站的数据插入到数据帧中。周期性过程数据通信由于其良好的实时性,主要用于实际控制中。本文测试部分以从站状态机为主线索,依次配置从站相关参数,直到从站到达运行状态,并且针对上述两种通信方式进行了功能测试。最后对EtherCAT进行了性能测试。本文中主站系统ECOU初步实现了EtherCAT协议,采用了嵌入式操作系统UC/OSII,具有良好的实时性。关键词:工业以太网;EtherCAT;周期性数据通信;非周期性数据通信;系统测试Abstract-II-AbstractWiththecontinuousadvancementofindustrialautomation,traditionalindustrialbusisunabletomeettheindustrialdemand,becauseitisslow,andhasasmallamountofdata.Atthesametime,withthedevelopmentofcomputernetwork,Ethernettechnologyusedinindustrialcontrolfieldbushasbecomeanimportantdevelopmentdirection.EtherCATproposedbyBECKHOFFofGermanyin2003,itishigh-speed,highdataefficiencyandsupportsavarietyofphysicaltopology.What’smore,thesystemiscomposedsimply,forexample,mastersusecommonARMdevelopmentboardandslavesusededicatecontrolchips.InordertoovercometheuncertaintyofMAClayerintraditionalEthernet,EtherCATmodifiesthetraditionalEthernetprotocol.Ethernetdataframetypeisthespecific0x88A4.IntheEtherCATprotocol,time-criticaldatasendsusingperiodicprocessdatamanner,andthenon-timecriticaldatausingaperiodicmanner.Aperiodicdatacommunicatesintwoways,namely,communicationprimitivesandmailboxcommunication.Thecommunicationprimitivesaremainlyusedfortheinitializationandconfigurationofmastersandslaves,suchasbasicregisterinitialization,mailboxconfigurationandsoon.Themailboxcommunicationisinapplicationlayer,realizingCOEprotocolfortheoperationofservicedataandPDO.Periodicprocessdatausesthemethodoflogicaladdressing,anditcanmulticast.Onepacketcanoperatemultipleslaves,eachslaveremovingtheincomingdata,andatthesametimeinsertingitsdatatothepacket.Becauseofthereal-time,periodicprocessdatacommunicationmethodismainlyusedforactualcontrol.Intestingsectionslavestatemachineisthemainclue.Thesystemconfigurestheslaves’relevantparametersinturnuntilslavesreachingtheOperationalstatus,andmakesthefunctionaltestsfortwomainmethodsofcommunication.Finally,maketheperformancetesting,includingsystemdelay.Inthisarticle,themastersystemECOUrealizestheEtherCATprotocolusingtheembeddedoperatingsystemofUC/OSII,andhasagoodreal-time.Keywords:IndustrialEthernet,EtherCAT,PeriodicDataCommunication,AperiodicDataCommunication,systemtesting目录-III-目录摘要.................................................................................................................IABSTRACT.......................................................................................................II第1章绪论.................................................................................................11.1课题背景及研究意义....................................................................11.2国内外研究现状...........................................................................31.3本文主要研究内容.......................................................................5第2章工业以太网及EtherCAT主站通信协议的架构设计..........................62.1三种工业以太网协议的性能比较...................................................62.1.1基于TCP/IP的实时工业以太网.......................................................62.1.2基于以太网实现的实时工业以太网.................................................72.1.3修改以太网的实时工业以太网........................................................82.2EtherCAT协议............................................................................82.2.1EtherCAT系统组成..........................................................................82.2.2EtherCAT数据帧结构......................................................................112.2.3EtherCAT报文寻址方式.................................................................122.3EtherCAT主站通信协议实现的整体架构......................................142.4本章小结....................................................................................15第3章EtherCAT非周期性数据通信的实现.................................................163.1EtherCAT通信原语的实现..........................................................163.1.1建立EtherCAT数据报....................................................................163.1.2通信原语的读写操作......................................................................193.1.3通信原语的应用...................................................................
本文标题:基于EtherCAT的工业以太网主站通信协议的实现
链接地址:https://www.777doc.com/doc-6973872 .html