ADS over EtherCAT (AoE)
The TwinCAT EAP device also supports the AoE protocol. The specification of the AoE protocol can be found in the EtherCAT Protocol Enhancements (ETG 1020). The difference between ADS/AMS communication and AoE communication is that, in contrast to ADS/AMS communication, AoE communication requires no TwinCAT router. The AoE protocol is one of the protocols that are classified in TwinCAT under the category Mailbox Communication. An EtherCAT telegram of type 5 (mailbox communication) is used for the communication of AoE. A mailbox telegram can be transmitted from or to the TwinCAT EAP device:
via Ethernet (EtherType = 0x88A4) or
via UDP/IP (UDP Port = 0x88A4)
It is possible to transport (tunnel) various protocols by mailbox communication. The protocol to be tunneled is defined on the basis of the field type in the Mailbox Header. The AoE protocol is specified by the value 1 (see Mailbox Header in the following illustration). The Mailbox Header is directly followed by the AoE Header and then by the AoE data. Its structure is identical to the ADS/AMS protocol (refer also to the TwinCAT ADS/AMS specification in the Beckhoff information system). This gives rise to the possibility to also use the CANopen SDO communication via the mailbox protocol. Analogous to the ADS/AMS protocol, the CANopen OD of the TwinCAT EAP device can be accessed as described in the chapter The TwinCAT ADS interface to the EAP device.
Sample:
In order to read the Vendor ID of the identity object from the EAP Object Dictionary, the ADS command is defined in the AoE Header on the basis of the Command ID.
AoE command |
Command ID |
Description |
---|---|---|
ADS Read |
2 |
ADS Read command for reading data |
ADS Write |
3 |
ADS Write command for writing data |
A distinction is made between Request = 0 and Response = 1 on the basis of the 0th bit in the State Flag of the AoE Header. The AoE Data field is subsequently populated with the following contents (see following illustration):
At the beginning there is an ADS Read Request Header with
- Index Group = 0x0000F302 for reading the contents of the parameter,
- Index Offset = 0x10180001 for addressing the Vendor ID parameter and
- Read Length = 4 to inform about the size of the available data buffer.
These are followed by the data buffer for the data to be read.