3 permanent ports and bridge port, 4 shadow buffer for register write operations, 5 circulating frames – BECKHOFF EtherCAT Technology Section I User Manual

Page 35: Permanent ports and bridge port, Shadow buffer for register write operations, Circulating frames, Figure 6: circulating frames

Advertising
background image

Frame Processing

Slave Controller

– Technology

I-15

Example Port Configuration with Ports 0, 1, and 2

If there are only ports 0, 1, and 2, a frame received at port 0 goes via the Auto-Forwarder and the
Loopback function to the EtherCAT Processing Unit which processes it. Then, the frame is sent to
logical port 3 which is not configured, so the Loopback function of port 3 forwards it to port 1. If port 1
is closed, the frame is forwarded by the Loopback function to port 2. If port 1 is open, the frame is sent
out at port 1. When the frame comes back into port 1, it is handled by the Auto-Forwarder and sent to
port 2. Again, if port 2 is closed, the frame is forwarded to port 0, otherwise, it is sent out at port 2.
When the frame comes back into port 2, it is handled by the Auto-Forwarder and then sent to the
Loopback function of port 0. Then it is handled by the Loopback function and sent out at port 0

– back

to the master.

3.3

Permanent Ports and Bridge Port

The EtherCAT ports of an ESC are typically permanent ports, which are directly available after Power-
On. Permanent ports are initially configured for Auto mode, i.e., they are opened after the link is
established. Additionally, some ESCs support an EtherCAT Bridge port (port 3), which is configured in
the SII EEPROM like PDI interfaces. This Bridge port becomes available if the EEPROM is loaded
successfully, and it is closed initially, i.e., it has to be opened (or set to Auto mode) explicitly by the
EtherCAT master.

3.4

Shadow Buffer for Register Write Operations

The ESCs have shadow buffers for write operations to registers (0x0000 to 0x0F7F). During a frame,
write data is stored in the shadow buffers. If the frame is received correctly, the values of the shadow
buffers are transferred into the effective registers. Otherwise, the values of the shadow buffers are not
taken over. As a consequence of this behavior, registers take their new value shortly after the FCS of
an EtherCAT frame is received. SyncManagers also change the buffers after the frame was received
correctly.

User and Process Memory do not have shadow buffers. Accesses to these areas are taking effect
directly. If a SyncManager is configured to User Memory or Process Memory, write data will be placed
in the memory, but the buffer will not change in case of an error.

3.5

Circulating Frames

The ESCs incorporate a mechanism for prevention of circulating frames. This mechanism is very
important for proper watchdog functionality.

This is an example network with a link failure between slave 1 and slave 2:

EtherCAT

master

EtherCAT

slave 1

P

o

rt

0

P

o

rt

1

EtherCAT

slave 2

P

o

rt

0

P

o

rt

1

EtherCAT

slave 3

P

o

rt

0

EtherCAT

slave N

P

o

rt

0

P

o

rt

0

P

o

rt

1

Figure 6: Circulating Frames

Both slave 1 and slave 2 detect the link failure and close their ports (port 1 at slave 1 and port 0 at
slave 2). A frame currently traveling through the ring at the right side of slave 2 might start circulating.
If such a frame contains output data, it might trigger the built-in watchdog of the ESCs, so the
watchdog never expires, although the EtherCAT master cannot update the outputs anymore.

To prevent this, a slave with no link at port 0 and loop control for port 0 set to Auto or Auto close (ESC
DL Control register 0x0100) will do the following inside the EtherCAT Processing Unit:

If the Circulating bit of the EtherCAT datagram is 0, set the Circulating bit to 1

If the Circulating bit is 1, do not process the frame and destroy it

The result is that circulating frames are detected and destroyed. Since the ESCs do not store the
frames for processing, a fragment of the frame will still circulate triggering the Link/Activity LEDs.
Nevertheless, the fragment is not processed.

Advertising