Standards/Ethercat/Frames
m |
|||
Line 25: | Line 25: | ||
'''Table 1: EtherCAT Frame Header''' | '''Table 1: EtherCAT Frame Header''' | ||
{|class=wikitable | {|class=wikitable | ||
− | |- | + | |- |
− | + | ! Field || Data Type || Value/Description | |
|- | |- | ||
| Length || 11 bit || Length of the EtherCAT datagrams (excl. FCS) | | Length || 11 bit || Length of the EtherCAT datagrams (excl. FCS) | ||
Line 47: | Line 47: | ||
'''Table 1: EtherCAT Frame Header''' | '''Table 1: EtherCAT Frame Header''' | ||
{|class=wikitable | {|class=wikitable | ||
− | |- | + | |- |
− | + | ! Field || Data Type || Value/Description | |
|- | |- | ||
| Cmd || Byte || EtherCAT Command Type | | Cmd || Byte || EtherCAT Command Type |
Revision as of 11:38, 12 June 2012
|
Introduction
EtherCAT uses standard IEEE 802.3 Ethernet frames, thus a standard network controller can be used and no special hardware is required on master side.
EtherCAT has a reserved EtherType of 0x88A4 that distinguishes it from other Ethernet frames. Thus, EtherCAT can run in parallel to other Ethernet protocols¹.
EtherCAT does not need the IP protocol, however it can be transported via IP/UDP. The EtherCAT Slave Controller processes the frame in hardware. Thus, communication performance is independent from processor power.
An EtherCAT frame is subdivided into the EtherCAT frame header followed by one or more EtherCAT datagrams. At least one EtherCAT datagram has to be in the frame. Only EtherCAT frames with Type 1 in the EtherCAT Header are processed by the ESCs. The ESCs also support IEEE802.1Q VLAN Tags, although the VLAN Tag contents are not evaluated by the ESC.
If the minimum Ethernet frame size requirement is not fulfilled, padding bytes have to be added. Otherwise the EtherCAT frame is exactly as large as the sum of all EtherCAT datagrams plus EtherCAT frame header.
¹ ESCs have to be configured to forward non-EtherCAT frames via DL Control register 0x0100.0.
EtherCAT Header
Figure 1 shows how an Ethernet frame containing EtherCAT data is assembled.
Figure 1: Ethernet Frame with EtherCAT Data
Table 1: EtherCAT Frame Header
Field | Data Type | Value/Description |
---|---|---|
Length | 11 bit | Length of the EtherCAT datagrams (excl. FCS) |
Reserved | 1 bit | Reserved, 0 |
Type | 4 bit | Protocol type. Only EtherCAT commands(Type = 0x1) are supported by ESCs. |
EtherCAT Datagram
Figure 2 shows the structure of an EtherCAT frame.
Figure 2: EtherCAT Datagram
Table 1: EtherCAT Frame Header
Field | Data Type | Value/Description |
---|---|---|
Cmd | Byte | EtherCAT Command Type |
Idx | Byte | The index is a numeric identifier used by the master for identification of duplicates/lost datagrams, that shall not be changed by EtherCAT slaves |
Address | Byte[4] | Address (Auto Increment, Configured Station Address, or Logical Address) |
Len | 11 bit | Length of the following data within this datagram |
R | 3 bit | Reserved, 0 |
C | 1 bit | Circulating frame ( 0: frame is not circulating / 1: frame has circulated once ) |
M | 1 bit | More EtherCAT datagrams ( 0: Last EtherCAT datagram / 1: More EtherCAT datagrams will follow ) |
IRQ | Word | EtherCAT Interrupt Request registers of all slaves combined with a logical OR |
Data | Byte[n] | Read/Write Data |
WKC | Word | Working Counter |