Click Here!

Spring 2007 Frontpage | Subscribe | Feedback 


In This Issue

EtherCAT
Technology Spotlight

Device Spotlight:
QPixel QL201B


Previous Issues

ATCA: The NexGen Telecom Standard

Video Processing in FPGA vs. DSP

Signal Integrity 101
Series: P1 | P2 | P3

Device Spotlights

Xilinx Virtex-5
Pixim D2500

Gennum VXP

IPFlex DAPDNA-2
TI DaVinci

Lattice XP
TI DM642 DSP
ADI TigerSharc
Altera's Nios II
Airgo Wireless



Nuvation HEADLINES 

New Events

» 

Nuvation turns 10 @ Cinco De Mayo Party in San Jose, CA, May 10

»  Nuvation at XFest, Mississauga, ON May 31

New Affiliations

» Gennum
Authorized Design Partner
» Microchip
Authorized Design House
» TI Low-Power RF Developer Network Member
»  TI DaVinci DSP Partner Expansion
 


EtherCAT: Technology Spotlight

Michael Diu
Design Engineer
Nuvation


USB on VistaEtherCAT (Ethernet for Control Automation Technology) is a new, open real-time Ethernet network technology. Its hardware, software and network design has been optimized to provide a deterministic, high performance capability for moving data around on your embedded device network.

Originally developed by Beckhoff Automation GmbH and introduced to the public in November 2003, EtherCAT is now in the final stages of international standardization with ISO and IEC (primarily in IEC 61158-4-12, IEC 61784-2, and ISO 15745). The trade group for EtherCAT is the EtherCAT Technology Group (www.ethercat.org).

EtherCAT holds considerable potential in embedded networking applications, particularly in motion control and factory automation. Applications requiring high bandwidth or high update rates like CNC, robotics and packaging are all candidates for EtherCAT technology. You should also consider it for highly distributed applications, those with a large number of nodes, like materials handling and data acquisition.

The technology compares favorably against other solutions like TCP/IP, CAN, Profinet IRT, EtherNet/IP and so on. Even certain backplane based systems, including PCI and VXI, may now be distributed as well. The key EtherCAT advantages are:

  • Greater bandwidth and bandwidth efficiency
  • Low latency
  • Large number of nodes (theoretically, around 65,000!)
  • Highly deterministic, no collisions and no arbitration required
  • Cheaper slaves, cabling, connectors, transceivers, diagnostic software
  • Variety of supported network topologies (line, ring, tree, drop lines, and more)
  • Centralized address assignment
  • No DIP switches or jumpers at each device
  • Simpler master and slave software stacks, with support for many RTOSs
  • Reuse of existing Ethernet knowledge, mature hardware, and diagnostic tools
  • Simple, low-cost, royalty-free license structure
  • Integration with PLC development environments, using the IEC 61131 standard

How It Works

EtherCAT uses a 100 Mbit/s, full duplex (thus collision free) link between nodes, which are physically connected using 100Base-TX (over usual CAT5e/CAT6 cable), 100Base-FX, or LVDS links. 

An EtherCAT network uses the ‘master node communicating with many slave nodes’ paradigm.  This requires foreknowledge of the types of slaves, their cabling order, and master-initiated communication.  The payoff is deterministic behavior and high performance – much less bandwidth wasted on overhead, and cycle times measured in μsec and milliseconds, not seconds. 

A master is usually a PC-class workstation with an ordinary Ethernet NIC.  An EtherCAT slave will typically consist of two Ethernet PHYs (“in” and “out”), EtherCAT slave controller (providing Ethernet Media Access Control -- MAC -- functionality), and a microcontroller.  As an alternative, MCU-less digital I/O is also provided directly from the slave controller, allowing for simple, low-cost slaves without any slave-side coding.

Fundamentally, EtherCAT slave controllers are a very creative departure from the traditional Ethernet MAC.  To address a slave, instead of specifying a unique MAC address (which they don’t possess), one of the following address modes is set in the EtherCAT header:

  • A slave’s unique, centrally assigned node number,

  • Its position in the chain (eg. 5th slave from the master), or

  • The slave’s assigned portions of a system-wide 32-bit address space. This unique feature is implemented in HW using a “Functional Memory Mapping Unit”.  Portions of this address space may be mapped into each slave’s dual-port RAM, with granularity down to one bit.  In this way, the end-user application could access the entire network as a single, contiguous memory space.

The address is processed by the slave in HW and requires no SW intervention at all.

As a result, while TCP/IP can be tunneled over EtherCAT, regular EtherCAT networks should not be connected to regular Ethernet networks, such as a corporate LAN!  Fortunately, the designers have thought of this and provided for a special tunneling EtherCAT over IP master mode, using UDP port 34980.

In EtherCAT, the slaves process chunks of bits called a datagram.  An EtherCAT datagram primarily contains the node addressing info, payload, and command (eg. read or write), as shown in Figure 1.  Multiple EtherCAT commands may be multiplexed into one or more Ethernet frames.  An EtherCAT cycle is composed of one or more frames, and is generated by the master at any rate it chooses.

Ethercat
Figure 1: Ethernet Frame Structure / EtherCAT Datagrams
Courtesy of Beckhoff, www.ethercat.org. All Rights Reserved

In the simplest EtherCAT topology, a daisy-chain, the cycle is created by a master and uses a broadcast destination MAC address. It makes its way through all the slaves and then back to the master, forming a logical loop.

When each slave gets a hold of the datagram (which will tell it to either read or write to a given slave controller RAM/register region), the slave controller HW inserts or removes bits on the fly, and forwards the modified packet on its outbound interface.  All this takes place in a matter of nanoseconds.  The last slave in a chain automatically forwards its outbound frames back towards the master. 

HW support is provided for each slave to modify a status counter in the Ethernet frame every single cycle if it has modified that frame.  The master SW checks this against its expected value, which provides a low-level acknowledgement that the transmission succeeded.  Additional data integrity detection is provided by the Ethernet Frame Check Sequence (CRC). 

Now that the cycle has returned to the master, its application-level software may do some processing on the received data, and the next cycle begins anew.


Case Study

Nuvation is one of a handful of companies in North America to have developed an EtherCAT slave, and certainly one of the first design services companies here to implement the technology.  

We recently completed a project with EtherCAT technology for a distributed control system within a factory automation system design.  This system is a great example of a design which was enabled by EtherCAT’s unique capabilities.  Each EtherCAT slave is complex subsystem with an FPGA, DSP, motor controllers, and external interfaces to sensors, GPIO, etc.

One of the many challenges of this design was a low latency requirement (single millisecond range), coupled with a large number of slaves that could be simultaneously communicating. EtherCAT.  With an enormous payload capacity (up to 1486 bytes per datagram), low slave CPU requirements, and fast cycle times, EtherCAT made it possible and scalable for the future.

EtherCAT was also used for remote firmware updates for the FPGA and DSP on board.  In a distributed environment, it would be very time-consuming to upgrade each slave individually, for instance via serial, JTAG or removable storage.  Additionally, synchronizing these individual software upgrades and the operation of the master stack, while ensuring uptime for the rest of the system, would be equally painful.  To minimize downtime and ensure consistency, a centralized upgrade system is provided using EtherCAT for both the FPGA and the DSP binaries.

Two very different real time operating systems were used in this project: Wind River's VxWorks and TI's DSP/BIOS.  Nuvation successfully integrated EtherCAT with both operating systems, also dealing with the differing processor byte sizes and endianness.

Another benefit of EtherCAT is that it allows XML configuration of master and slave.  For the project, this feature was quite useful, providing excellent source control compatibility as well as leveraging a variety of editors and automated validation tools.  The ongoing benefit to XML configuration is that it can easily be modified by future customer-supplied programs.

Extensive error handling scenarios and responses were also considered, an expensive, time-consuming, yet critical part of any distributed control application.  Savings were realized by using open source Ethernet network protocol analyzers with an EtherCAT plugin vs proprietary and costly analyzer HW/SW for other fieldbuses.

EtherCAT has many more interesting features that were not used on this particular project:

  • Distributed synchronization and timing facilities:  A user-specified subset of slaves can output values, or sample inputs at the same time.  This time is synchronized system-wide to << 1 µsec, and accounts for propagation and slave delays.  What’s more, the time can be synchronized with the outside world as well, via the IEEE 1588 clock synchronization standard.
  • Hot swapping of devices, and hot connect of network segments
  • Support for safety critical systems via redundant cable connections for a master
  • Support for "emergency shutdown" systems:  EtherCAT is suitable for use in IEC 61508 safety systems up to Safety Integrity Level 3
  • Compatibility with many popular application layer protocols:
    • CANopen
    • SERCOS
  • Gateway devices to integrate many existing fieldbuses:
    • RS232  / RS422 / RS485
    • Profibus, DeviceNet, Interbus, etc.
  • Ethernet over EtherCAT tunneling



Conclusion

With low cost, familiar Ethernet hardware and royalty-free licensing, flexible software and network models, open standards, class leading performance, interoperability with other fieldbuses, and a huge list of other features, EtherCAT technology is poised for success. 

Some of the EtherCAT and embedded networking related services Nuvation offers customers include:

  • Feasibility studies and requirements analysis
  • Systems, network and protocol design
  • Migration from other networking solutions
  • CANopen integration
  • EtherCAT master and slave software design
  • EtherCAT slave hardware design
  • Generation of the necessary XML configuration files on master and slave sides
  • Master stack selection and integration with real-time operating systems
  • Relationships with and knowledge of ASIC/IP core suppliers, SW stack suppliers, configuration and diagnostic tools and with the EtherCAT Technology Group
  • Systems integration and testing
  • Preparation and design for regulatory conformance testing, which is mandatory for commercially resold products

Nuvation possesses specialized EtherCAT design services within our larger umbrella of electronic design expertise including FPGA/ASIC, digital/analog board design, DSP/MCU, RF/wireless, signal integrity, embedded software and turnkey product design.  For more information please contact Nuvation at sales@nuvation.com.


Additional Quicklinks:

Ask Nuvation a Technical Question
Get an Online Quote

Search Nuvation.com
Customer service
· To subscribe yourself or a friend, please click here.
· Questions? Comments? Send us your feedback.





Copyright © Nuvation Research Corporation 2007. All rights reserved.
Privacy Policy | About Nuvation | NUVATION.COM