EtherCAT从站搭建指南(中英版)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

2.EtherCATSlaveImplementation(从站实施)2.1GeneralProcedure–StepbyStep2.2AdministrativeOrganization(管理机构)2.2.1DevelopmentTimeTodevelopanewrunningslavesystem,operatedbyastandardEtherCATmaster,about6-8weeksarefeasible.Herein,partsoftheownapplicationdevelopmentarealreadyincluded.Thehardwaredesignofthedevicedependsondevicetype(withorwithoutµC)andtheamountandtypeofports(MIIorLVDS).Table4showsthecomponentsneededforaslavedevice.2.2.2ETGMembershipandVendorID(会员和厂商ID)2.2.3EtherCATConformanceTestToolLicense(一致性测试工具执照)2.3EtherCATSlaveDesign(从站设计)EtherCATfeaturesaretobeselectedaccordingtothedevicerequirements(需求).Thus,todevelopanEtherCATslavedevice,thedevelopershouldbeconsciousabouttherequirementsofthedevicetodecidewhichcharacteristicistobechosenforeveryEtherCATfeature.Inthefollowing,anoverviewtothedesigncriteria(设计准则)isgivenofwhichtheESCisthemostimportantEtherCATcharacteristic.Theconfigurationofthesecriteriaisfinallystored(这个配置标准最后储存在)intheESIfileandtheEEPROM.2.3.1BusInterfacetoEtherCATNetwork(总线接口)这需要决定于ESC的选择(相适应),一般一个独立的设备通过100BaseTX或者100BaseFx电缆连接到Network若要从从模块设备连到外部接口,一个Converter(从100Base到LVDS)是必需的ApplicationNote:Astand-alonedeviceshouldsupportatleasttwoMIIports(RJ45orM12D-Codeconnectors)toprovidelineconnection.Thelogicalportforconnectionisdeterminedbasedonthenumberofportsbeingused.Forstandard2portusage,port0andport1areused.ThePHYsshouldbeselectedaccordingto(参考)thePHYSelectionGuide(PHY选择指南).注:LVDS低压差分信号(LowVoltageDifferentialSignaling)MII(MediaIndependentInterface)是介质无关接口。40针。MII类似于10Mbps以太网的连接单元接口(AUI)。MII层定义了在100BASE-TMAC和各种物理层之间的标准电气和机械接口,这种标准接口类似于经典以太网中的AUI,它允许制造厂家制造与介质和布线无关的产品,利用外接MAU去连接实际的物理电缆。100Base-FX使用的是两股光纤,其中一股用于发送数据,另一股用于接收数据。可用单模光纤或者多模光纤,在全双工情况下,单模光纤的最大传输距离是40千米,多模光纤的最大传输距离是2千米。100Base-FX信号的编码于100Base-TX一样采用4B/5B-NRZI方案。100BASE-TX使用的是两对抗阻为100欧姆的5类非屏蔽双绞线,最大传输距离是100米。其中一对用于发送数据,另一对用于接受数据。100BASE-TX采用的是4B/5B编码方式,即把每4位数据用5位的编码组来表示,该编码方式的码元利用率=4/5*100%=80%。然后将4B/5B编码成NRZI进行传输。2.3.2EtherCATSlaveController(ESC,从站控制器)andPDITheESCisthecontroller(控制器)whichprovidesthecommunicationinterface(提供通讯接口)betweentheEtherCATnetworkandthehostcontroller(deviceapplicationcontroller设备应用控制)orthedigitalI/O(ifnohostcontrollerisused在没有主机控制使用的情况下).Basically,theESCcanbeimplementedasASICorasFPGAwithIPCore(可以在工作在两种模式下,ASIC和FPGA).TheEtherCATfunctionalityisthesameforbothtypes(两种模式可以实现的功能是相同的),sothechoicewhichtypetouseisuptothevendor(选择取决于厂商).IfpreferringanASIC,anadditionalEEPROMisnecessaryandtheDPRAMmaybelimitedtolessthan64kbyte(dependingontheESC).Ifknow-how(诀窍,使用方法)ofFPGAprogrammingisavailableandintellectualproperty(IPcore)isalreadyathand,thechoiceforanFPGAimplementationisobvious(明显的)andtheIPCoreonlyneedstobeadaptedtotheEtherCATcommunication(IPCore只需和EtherCAT通讯相适应).AnFPGAmayalsobeanoptionifhardwarespaceforbothanASICandanEEPROMisnotavailable.注:FPGA是英文Field-ProgrammableGateArray的缩写,即现场可编程门阵列,它是在PAL、GAL、EPLD等可编程器件的基础上进一步发展的产物。它是作为专用集成电路(ASIC)领域中的一种半定制电路而出现的,既解决了定制电路的不足,又克服了原有可编程器件门电路数有限的缺点。ASIC(ApplicationSpecificIntegratedCircuit)是专用集成电路。目前,在集成电路界ASIC被认为是一种为专门目的而设计的集成电路。是指应特定用户要求和特定电子系统的需要而设计、制造的集成电路。ASIC的特点是面向特定用户的需求,ASIC在批量生产时与通用集成电路相比具有体积更小、功耗更低、可靠性提高、性能提高、保密性增强、成本降低等优点。IP核(IPCore)是具有特定电路功能的硬件描述语言程序,可较方便地进行修改和定制,以提高设计效率使用说明:AnoverviewofavailableASICSandFPGAsisgivenbytheETGinchapter3ofsectionIIorintheESCProductGuide(ESC产品指南).Inthefollowing,theESCselectioncriteriaarediscussedinmoredetail.•NumberandtypeofEtherCATports(MII,LVDS)(端口的数量和型号)Basically,EtherCATdeviceshavetwoportssothattheycanbeconnectedinalinetopology(在一个线拓扑).Thenumberofportsandporttype(端口数量和型号)arekeyselectioncriteria(关键的选择标准)ofESCs..Interfaceforprocessdataexchange(PDI)(过程数据交换接口)ForASICs,simpledevicesusuallyrequirenoapplicationlogicinsoftware(µC)butonlydigitalI/O(简单的设备只需要数字I/O口).Complexdevicesoperateviaaserialperipheralinterface(SPI,串行外设接口)or8/16bitsynchronousorasynchronous(同步或者异步)microcontrollerinterface(MCI,微控制器接口)viaparallelport(通过平行端口).IfusinganEtherCATIPcore,theFPGAspecificon-board-bus(并行总线)isappliedasPDIsinceESC,EEPROMandµCareintegrated(集成的)intheIPCore.ForonAlteradevicesAvalonisusedresp.OPB(片上外设总线)onXilinx【赛灵思公司(可编程逻辑解决方案的全球领导厂商)】devices.•DPRAM(双端口存储器)sizeandnumberofSyncManagers(同步管理)TheDPRAMisusedforexchangeofcyclicandacyclicdata(循环和非循环的数据交换)viatheEtherCATnetwork.SyncManagersensuredataconsistency(保证数据的一致性)withintheDPRAM.EachESChas4kByteofregisters(addresses0x0000to0x0FFF)whicharereservedfor(EtherCATandPDIcommunication)configurationsettings(配置设置).Mailbox(邮箱)andprocessdataisexchangedviaadditionalDPRAM(alsocalledusermemory用户存储器).EtherCATallowsaddressing(编址)ofusermemoryofupto60kBytes.ASICsprovidebetween1kByteand8kByteofDPRAM,IPCorescanbeconfiguredtoprovidethefull60kByteofusermemory.ApplicationNote:ThestandardSyncManagerconfigurationis(标准的同步管理配置)-1SyncManagerperacyclicdataoutput(mailboxout,mastertoslave)-1SMforacyclicdatainput(mailboxin,slavetomaster)-1SMforcyclicdataoutput(processdataout,mastertoslave)-1SMforcyclicdatainput(processdatain,slavetomaster)Forprocessdata,SMrunningin3-buffer-mode(3种缓存模式)needthreetimesthelength(3倍长度)ofactualprocessdataforphysicalmemory(物理内存).Thefoll

1 / 24
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功