EtherCAT - 以太網(wǎng)現(xiàn)場(chǎng)總線
圖13: 主站樣本代碼結(jié)構(gòu)
A cost-effective EtherCAT slave controller is used in the slave devices. With EtherCAT the slave does not need a microcontroller at all. Simple devices that get by with an I/O interface can be implemented only with the ESC and the underlying PHY, magnetics and the RJ45 connector. The process data interface (PDI) to the slave application is a 32- bit I/O interface. This slave without configurable parameters needs no software or mailbox protocol. The EtherCAT State Machine is handled in the ESC. The boot-up information for the ESC comes out of the EEPROM that also supports the identity information of the slave. More complex slaves that are configurable have a host CPU on board.This CPU is connected to the ESC with an 8-bit or 16-bit parallel interface or via a serial connection (SPI). The performance of the host CPU is determined by the slave application – the EtherCAT protocol software can be run additionally.The EtherCAT stack manages the EtherCAT state machine and the communication protocol: This means in general the CoE protocol and for supporting firmware download FoE. Optional the EoE protocol can be implemented.
5.2.1 EtherCAT Slave Controller
目前,有多家制造商均提供EtherCAT從站控制器。通過(guò)價(jià)格低廉的FPGA,也可實(shí)現(xiàn)從站控制器的功能,可以購(gòu)買(mǎi)授權(quán)以獲取相應(yīng)的二進(jìn)制代碼。 從站控制器通常都有一個(gè)內(nèi)部的DPRAM,并提供存取這些應(yīng)用內(nèi)存的接口范圍:
串行SPI(串行外圍接口)主要用于數(shù)量較小的過(guò)程數(shù)據(jù)設(shè)備,如模擬量I/O模塊、傳感器、編碼器和簡(jiǎn)單驅(qū)動(dòng)等。該接口通常使用8位微控制器,如微型芯片PIC、DSP、Intel 80C51等。
8/16位微控制器并行接口與帶有DPRAM接口的傳統(tǒng)現(xiàn)場(chǎng)總線控制器接口相對(duì)應(yīng),尤其適用于數(shù)據(jù)量較大的復(fù)雜設(shè)備。通常情況下,微控制器使用的接口包括Infineon 80C16x、Intel 80x86、Hitachi SH1、ST10、ARM和TI TMS320等系列。
32位并行I/O接口不僅可以連接多達(dá)32位數(shù)字輸入/輸出,而且也適用于簡(jiǎn)單的傳感器或執(zhí)行器的32位數(shù)據(jù)操作。這類(lèi)設(shè)備無(wú)需主機(jī)CPU。
圖14: 從站硬件:帶主機(jī)CPU的FPGA
圖15: 從站硬件:帶直接I/O的FPGA
5.2.2 從站評(píng)估工具包
從站評(píng)估工具包使接口操作變得簡(jiǎn)便易行。由于采用了EtherCAT,無(wú)需功能強(qiáng)大的通訊處理器,因此,可將從站評(píng)估工具包中的8位微處理器作為主機(jī)CPU使用。該工具包還包括源代碼形式的從站主機(jī)軟件(相當(dāng)于協(xié)議堆棧)和主站軟件樣本包。
6. 小結(jié)
EtherCAT 擁有杰出的通訊性能,接線非常簡(jiǎn)單,并對(duì)其它協(xié)議開(kāi)放。傳統(tǒng)的現(xiàn)場(chǎng)總線系統(tǒng)已達(dá)到了極限,而EtherCAT則突破建立了新的技術(shù)標(biāo)準(zhǔn)——30 μs內(nèi)可以更新1000個(gè)I/O數(shù)據(jù),可選擇雙絞線或光纖,并利用以太網(wǎng)和因特網(wǎng)技術(shù)實(shí)現(xiàn)垂直優(yōu)化集成。使用 EtherCAT,可以用簡(jiǎn)單的線型拓?fù)浣Y(jié)構(gòu)替代昂貴的星型以太網(wǎng)拓?fù)浣Y(jié)構(gòu),無(wú)需昂貴的基礎(chǔ)組件。EtherCAT還可以使用傳統(tǒng)的交換機(jī)連接方式,以集成其它的以太網(wǎng)設(shè)備。其它的實(shí)時(shí)以太網(wǎng)方案需要與控制器進(jìn)行特殊連接,而EtherCAT只需要價(jià)格低廉的標(biāo)準(zhǔn)以太網(wǎng)卡(NIC) 便可實(shí)現(xiàn)。
EtherCAT擁有多種機(jī)制,支持主站到從站、從站到從站以及主站到主站之間的通訊(參見(jiàn)圖16)。它實(shí)現(xiàn)了安全功能,采用技術(shù)可行且經(jīng)濟(jì)實(shí)用的方法,使以太網(wǎng)技術(shù)可以向下延伸至I/O級(jí)。EtherCAT功能優(yōu)越,可以完全兼容以太網(wǎng),可將因特網(wǎng)技術(shù)嵌入到簡(jiǎn)單設(shè)備中,并最大化地利用了以太網(wǎng)所提供的巨大帶寬,是一種實(shí)時(shí)性能優(yōu)越且成本低廉的網(wǎng)絡(luò)技術(shù)。
圖16: 網(wǎng)絡(luò)結(jié)構(gòu)形式多樣
[1] EtherCAT Technology Group (ETG)
http://www.ethercat.org
[2] IEC 61158-3/4/5/6-12 (Ed.1.0), Industrial communication networks – Fieldbus specifications – Part 3-12: Data-link layer service definition – Part 4-12: Data-link layer protocol specification – Part 5-12: Application layer service definition – Part 6-12: Application layer protocol specification – Type 12 elements (EtherCAT)
[3] IEEE 802.3: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Access Method and Physical Layer Specifications
[4] IEEE 802.3ae-2002: CSMA/CD Access Method and Physical Layer Specifications: Media Access Control (MAC) Parameters, Physical Layers, and Management Parameters for 10 Gb/s Operation
[5] ANSI/TIA/EIA-644-A, Electrical Characteristics of Low Voltage Differential Signaling (LVDS) Interface Circuits
[6] IEEE 1588-2002: IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems
[7] EN 50325-4: Industrial communications subsystem based on ISO 11898 (CAN) for controller-device interfaces. Part 4: CANopen
[8] IEC 61800-7-301/304 (Ed.1.0), Adjustable speed electrical power drive systems – Part 7-301: Generic interface and use of profiles for power drive systems – Mapping of profile type 1 to network technologies – Part 7-304: Generic interface and use of profiles for power drive systems – Mapping of profile type 4 to network technologies
[9] SEMI E54.20: Standard for Sensor/Actuator Network Communications for EtherCAT.
http://www.semi.org
[10] IEC 61784-2 (Ed.1.0), Industrial communication networks – Profiles – Part 2: Additional fieldbus profiles for real-time networks based on ISO/IEC 8802-3
評(píng)論