Design and Implementation of Ethercat Slave Based On Arm Cortex-M0
Design and Implementation of Ethercat Slave Based On Arm Cortex-M0
on ARM Cortex-M0
1 Introduction
Each EtherCAT slave node can transmit Ethernet frames in a short cycle time. The
physical layer of EtherCAT uses the standard Ethernet technology, so the
conventional Ethernet cables, connectors and tools are available. Because EtherCAT
master adopts a standard network controller, it is very cost-effective without special
hardware required.
EtherCAT uses standard IEEE 802.3 Ethernet frames and it has a reserved
EtherType of 0x88A4. The EtherCAT Slave Controller processes the frame in
hardware. An EtherCAT frame is subdivided into the EtherCAT header followed by
one or more EtherCAT datagrams as shown in Fig. 1[5]. The EtherCAT frame has at
least one EtherCAT datagram. If the minimum Ethernet frame size requirement is not
fulfilled, padding bytes have to be added. Otherwise the length of EtherCAT frame is
equal to the sum of all EtherCAT datagrams plus EtherCAT frame header.
Fig. 3 shows the structure of an EtherCAT datagram. Each datagram has header,
data and working counter. The working counter counts the number of devices that
were successfully addressed by this EtherCAT datagram.
The input/output connection panel has eight 16-bits input port and eight 16-bits
output ports. The NUC140 microcontroller gets Ethercat output from registers of
ESC and transfer to corresponding output ports. Then, NUC140 microcontroller gets
data from input ports and transfers data to register of ESC respectively. A 4-to-16 line
demultiplexer accepts four binary line inputs and provides 16 mutually exclusive
active LOW outputs. The demultiplexer sets only one of the 8 inputs and 8 outputs as
active.
The test system contains a master and three slave nodes. The master includes a PC,
standard Ethernet interfaces and TwinCAT software. The master connects EtherCAT
slave module with unshielded twisted pair. The connection of the devices is shown in
Fig. 4.
The I/O information of each EtherCAT slave is read from and entered in the
TwinCAT System Manager. The TwinCAT software scan slave devices, the screen of
inputs and outputs appeared as shown in Fig. 7. The operation state of EtherCAT
slave BOX 1 is in OP. There are no communication problems in EtherCAT slave
hardware circuit. Next, began the debugging of ESM(EtherCAT State machine)
configuration file and the driver programs.
This paper presents a slave module that based on EherCAT technology and Cortex-
M0 microcontroller. The EherCAT frame passed through each slave node in units of
several nanoseconds, so the slave module can meet the real-time requirements in
industrial automation. With the excellent performance of the real-time EtherCAT
technology, it would be accepted by more and more developers in industry control
fields. For the future study, how to port the EherCAT master to various embedded
platforms connected with the proposed EtherCAT slave is a challenge.
Acknowledgments. This study was funded by grants from Foxnum Technology Co.,
Ltd.(project no. 302205501), so that the study can be completed smoothly.
References
1. Zhu, Z. H.; Wang Y. E.: The real-time technology research of industrial Ethernet in
control field. In: 2010 International Conference on Mechanic Automation and Control
Engineering (MACE), pp. 5274-5277. Wuhan, China(2010)
2. Dalimir Orfanus, Reidar Indergaard, Gunnar Prytz, Tormod Wien: EtherCAT-based
Platform for Distributed Control in High-Performance Industrial Applications. In: 2013
IEEE 18th Conference on Emerging Technologies & Factory Automation (ETFA), pp. 1-8.
Cagliari, Italy(2013)
3. Yiming, A.; Eisaka, T.: Development of an Ethernet protocol for industrial real-time
communications. 2004 IEEE International Symposium on Communications and
Information Technology, vol. 2, pp. 1122-1125. Japan (2004)
4. Decotignie, J. D.: Ethernet-Based Real-Time and Industrial Communications. Proceedings
of the IEEE, Vol. 93(6), pp. 1102-1117(2005)
5. Hardware Datasheet ET1100 EtherCAT Slave Controller, BECKHOFF, Germany(2010)
6. NuMicro NUC100 Series NUC130NUC140 Technical Reference Manual, NuMicro,
Taipei(2011))