How does EtherCAT support different network topologies?

3.2k views Asked by At

How does EtherCAT support different network topologies?

Assume a pure EtherCAT network without any standard ethernet switches, hubs, etc... to complicate things, and with one master and multiple slaves.

Some sources describe it as only supporting ring topologies (i.e. Wikipedia), and this makes sense given the theory of operation, but the EtherCAT website says it supports other topologies as well.

100BaseTX ethernet cables contains two half-duplex links, one in each direction; is it true that when viewed as a graph of half-duplex links, EtherCAT is always a ring bus, but when viewed as a graph of physical ethernet cables, the graph can be almost arbitrary?

4

There are 4 answers

4
Eric Z On BEST ANSWER

That's right.

When viewed physically, there can be lots of topologies: dasiy chain, star, tree, etc. For example, you can use Beckhoff EK1122 module to create a three-branch star topology. Logically, there is a single determined path around all the nodes(master and slaves) that EtherCAT frames go through. That forms a ring because the master is the source that initiates all frames and is also the final destination that all frames will go back to.

0
Tobias Knauss On

As Eric Z has answered above, it may be a physical line, ring, star or tree. And he says, that the packet will go through a logical ring. But he did not say how this is achieved, see my comments on his answer. Therefore I digged a little deeper and found this article:
http://digital.ni.com/public.nsf/allkb/3399C1A0211EDC14862580140065286B

which describe that for a "dedicated EtherCAT junction" is needed to build a star (or a tree):

Star:
This is the most familiar topology for many new to EtherCAT®, as it resembles are regular Ethernet network using hubs. However, to implement this, you will need a dedicated EtherCAT® junction. Because of this, it is potentially costlier than ring or line. Also, this topology will be marginally slower than others, as there are more interstitial nodes that must repeat the message between the end nodes (e.g. for a EtherCAT® packet to go from master to slave, it must go through the junction/hub first, which will introduce a small delay). In fact, EtherCAT® star topology is not like traditional star topologies – it is actually a line topology in which data goes through junction port 1, reaches its end slave and comes back to the junction, and then comes through junction port 2 the same way. This topology is best for systems in locations with physical constraints that make it difficult to implement line or ring.

Searching for "EtherCAT junction" I found
https://www.beckhoff.com/english.asp?ethercat/ek1122.htm
which actually is the prodct that Eric Z mentioned, a 2-port EtherCAT junction. There are 8-port devices as well, https://www.beckhoff.com/english.asp?pc_cards_switches/cu1128.htm

0
Chris On

(Some additional info)

If you have a look for the way EtherCAT masters addresses their slaves, you will see that even if you have a daisy chain topology, the telegram transport behaves like a line topology. It is because the Master counts all the slaves which are present at the bus and assigns an auto-incremental address (in the first phase) to them. Thats the order how the telegram will be processed by the slaves. So the Master passes the telegram to slave1, it puts on the fly its data into its section and passes to slave2 and so on. The last slave closes the bus and sends the telegram back. In the user manual they use sometimes the word "shortcutted".

So physically you can have nearly every topologie you want, but logically you have a line. If you´d like to have redundancy, you could connect the last slave with a second EtherCAT port at the master. This would give you a real ring topology and the bus would still work in the case that a slave goes down (excluded the defect slave).

0
Speed8ump On

An EtherCAT "loop" is a connected set of slave devices, which can each connect to at most four neighboring devices. These four possible connections are called ports and are numbered 0-3. Port 0 is the "upstream" connection, which I usually describe as connecting to the slave's parent device, port 1 is usually whatever the "straight through" path would be.

If you take a bus coupler (EK1100) for example, it has:

  • port 0: RJ45 socket (for Ethernet 8P8C connector) labelled "X1 In"
  • port 1: EBUS-Out (for EBUS slice connections)
  • port 2: RJ45 socket labelled "X2 Out"

For comparison an EBUS junction has:

  • port 0: EBUS-In (for connection to upstream EBUS slices)
  • port 1: EBUS-Out
  • port 2: RJ45 socket labelled "X1"
  • port 3: RJ45 socket labelled "X2"

And a bus extension (EK1110) has:

  • port 0: EBUS-In
  • port 1: RJ45 socket labelled "X1 Out"

These connections form a graph where every slave is a node having exactly one parent and at most three children. Each edge in the graph represents a bidirectional ethernet connection between two ports. Once you have built up this connected graph of slaves the auto-increment numbering scheme results from a depth first traversal of the tree, numbering each new slave with the next free number. Sub-graphs are explored along port 1, port 3, then port 2 (no clue why it's that order).

So, yes, each half duplex link is traversed only once during a packet transmission through the network, meaning that it can be viewed as a ring of half duplex links, with each slave-to-slave connection appearing on the ring in two places (once for each direction of traversal).