EtherCAT - 以太网现场总线
图13: 主站样本代码结构
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从站控制器。通过价格低廉的FPGA,也可实现从站控制器的功能,可以购买授权以获取相应的二进制代码。 从站控制器通常都有一个内部的DPRAM,并提供存取这些应用内存的接口范围:
串行SPI(串行外围接口)主要用于数量较小的过程数据设备,如模拟量I/O模块、传感器、编码器和简单驱动等。该接口通常使用8位微控制器,如微型芯片PIC、DSP、Intel 80C51等。
8/16位微控制器并行接口与带有DPRAM接口的传统现场总线控制器接口相对应,尤其适用于数据量较大的复杂设备。通常情况下,微控制器使用的接口包括Infineon 80C16x、Intel 80x86、Hitachi SH1、ST10、ARM和TI TMS320等系列。
32位并行I/O接口不仅可以连接多达32位数字输入/输出,而且也适用于简单的传感器或执行器的32位数据操作。这类设备无需主机CPU。
图14: 从站硬件:带主机CPU的FPGA
图15: 从站硬件:带直接I/O的FPGA
5.2.2 从站评估工具包
从站评估工具包使接口操作变得简便易行。由于采用了EtherCAT,无需功能强大的通讯处理器,因此,可将从站评估工具包中的8位微处理器作为主机CPU使用。该工具包还包括源代码形式的从站主机软件(相当于协议堆栈)和主站软件样本包。
6. 小结
EtherCAT 拥有杰出的通讯性能,接线非常简单,并对其它协议开放。传统的现场总线系统已达到了极限,而EtherCAT则突破建立了新的技术标准——30 µs内可以更新1000个I/O数据,可选择双绞线或光纤,并利用以太网和因特网技术实现垂直优化集成。使用 EtherCAT,可以用简单的线型拓扑结构替代昂贵的星型以太网拓扑结构,无需昂贵的基础组件。EtherCAT还可以使用传统的交换机连接方式,以集成其它的以太网设备。其它的实时以太网方案需要与控制器进行特殊连接,而EtherCAT只需要价格低廉的标准以太网卡(NIC) 便可实现。
EtherCAT拥有多种机制,支持主站到从站、从站到从站以及主站到主站之间的通讯(参见图16)。它实现了安全功能,采用技术可行且经济实用的方法,使以太网技术可以向下延伸至I/O级。EtherCAT功能优越,可以完全兼容以太网,可将因特网技术嵌入到简单设备中,并最大化地利用了以太网所提供的巨大带宽,是一种实时性能优越且成本低廉的网络技术。
图16: 网络结构形式多样
[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
评论