<<

CAN and – similar but different

Engineering

Christian Bornschein

Author AN and Ethernet have Christian Bornschein Cthe need for commu- Port GmbH nication in common. Other Regensburger Straße 7b characteristics are different, DE-06132 Halle an der for example the kind of de- Saale vices the networks are used Tel.: +49-345-777550 for. From the very beginning Fax: +49-345-7775520 CAN was intended to trans- fer small packets of con- Link trol data in hard real time, www.port.de while Ethernet was creat- ed to move large amount of data. For Ethernet, being de- terministic or real-time was not part of the plan. Common is also their creation as bus- Figure 1: Delay caused by a Hub ses. CAN is still a bus, Ether- net not anymore. The switch to twisted pair and star topol- ogy as well as the use of mul- Introduction tiport bridges made Ethernet Ethernet is significantly even more of a “data lorry”. older than CAN. While At first Ethernet shared Ethernet was invented with CAN the idea of a bus: in 1973 but published in All nodes were “listening on 1976, CAN was created the same wire”, the Yellow in 1983 and published Cable or the RG58, the in 1987. Both networks Cheapernet. This topolo- had the reason for their gy was limited to 10 Mbit/s. invention in common: Only Half Duplex communi- The need for various cation was possible. Upon devices to communicate. transition to 100 Mbit/s the This article outlines the common basics of CAN and Figure 2: Delay introduced by a Switch (best case) differences between CAN Ethernet vanished com- and pletely when the Ethernet typical delay of a hub. The something goes wrong. A and shows some of the topology changed to point significant effect is that in switched Ethernet network challenges of Industrial to point topology with Twist- a Half Duplex network only with its highway-like infra- Ethernet with some ed Pair cables. The Full-Du- one node can communi- structure provides a perfect technical background. plex Mode, introduced by the cate, while all other nodes base for the Ethernet “data Furthermore it raises the Ethernet Multi Port Bridges, are quiet. Every node on the lorries”. question: Why switching which was called “Switches”, network sees all valid data to Ethernet at all? took over and the Half Du- packets, which is good for 7KHKDUGZDUH plex Mode, used by the re- Real-Time Control such as peaters, also called “Hubs”, it is used in CAN networks, Connecting CAN to the bus disappeared. but bad for a “data lorry” takes little effort: Take a CPU In the Half Duplex Mode network, since other nodes or MCU with on-board CAN every network message was could be communicating dur- controller, some optional op- seen everywhere in the net- ing this time. tical isolators, a CAN trans- work. On the face of it this Full Duplex uses Eth- ceiver, and a connector. For seems to be an advantage, ernet Switches, and Switch- software connectivity (e.g. especially considering that es cause delays by storing CANopen) a protocol library Hubs cause a very small packets and sending them is needed, in a perfect world delay. Figure 1 shows the out randomly – or not, if coming with a GUI Design

34 CAN Newsletter 4/2013 canAnalyser Tool to ease up and speed up messages with a dynamic the development process. answer in hardware, roughly New Version 3.0 Connecting Office Eth- FRPSDUDEOH ZLWK &$1·V 5H- ernet is not significantly more mote Transmission Request. complicated than CAN. The These components are usu- components are similar: ally carried by a FPGA. Only Take a PHY (equivalent to in very rare and very spe- the ), an Ethernet cific use cases, standard transformer (equivalent to the Ethernet components are optical isolator) and a RJ45 suitable. Powerlink claims connector. full management of the net- Connecting to Industri- work and only grants access al Ethernet is not that simple to “regular” (TCP/IP) network since many aspects need to traffic in the ASND cycle. be taken into consideration. The components are basical- (WKHUFDW ly the same; however Indus- trial proof equipment needs Ethercat comes with a com- to be used. A protocol library pletely modified Layer 2, al- with corresponding Design ways needing an Ethercat Tools is needed for the soft- Slave Controller (ESC) – the ware here as well – in a per- component of fect world the libraries would Ethercat. These ESCs are be compatible with other pro- available by Beckhoff as IP- tocol libraries. Cores for FPGA or ASIC component. Some semicon- 6WDUYVOLQHVWUXFWXUH ductor manufacturers have integrated ESCs in their Different than CAN, Ethernet CPU/ MCU designs. Ethercat is connected in star struc- claims full access to the net- ture: One single Ethernet work as well and allows for port is connected to an Eth- “regular“ (TCP/IP) network ernet Switch. For obvious traffic with the EoE (Ethernet UHDVRQV WKLV GRHVQ·W DOZD\V over EtherCAT) mailbox pro- make sense in Industrial Eth- tocol. ernet applications. To accom- „Powerful analyzing, stimulation, plish a line structure an Eth- 3URILQHWDQG recording and data interpretation ernet Switch or Ethernet Hub (WKHUQHW,3 needs to be built into the unit. functionality Since nothing is easy Different than Ethercat and when it comes to Industrial Powerlink, Profinet and Eth- Ethernet, specific line struc- ernet/IP work with standard „For CAN, CANopen, DeviceNet ture components need to be components only except for incorporated – e.g. a Man- Profinet IRT. Both protocols and SAE J1939 based systems aged Switch, an extremely can be integrated in stan- low latency Ethernet Hub for dard network environments „ New: Powerlink, an Ethercat slave and are able to use existing  Multi-board feature controller for Ethercat, or a network stacks (e.g. TCP/IP supports multiple CAN interfaces managed Ethernet switch for Stacks). While Ethernet/IP Profinet and Ethernet/IP. uses only regular UDP/TCP simultaneous communication, Profinet uses 3RZHUOLQN a proprietary scheme for real time data. Both protocols rep- „New: Improved database concept Powerlink was among the first resent the most significant Industrial Ethernet networks. market share. and graphic display of signals and It adopted the CAN in Automa- statistic data tion communication scheme &RQFOXVLRQ as well as profiles and was considered the CANopen on Application requirements can „New: Data transmission and Ethernet for quite some time. sway the decision in favor of It needs specialized hardware Ethernet or CAN. While CAN reception based on signal level to take advantage of Ether- is designed for Industrial Au- QHW·V IHDWXUHV ZKLOH PDLQ- tomation, Ethernet is made taining industrial suitability. ready for Industrial Automa- This hardware is an extreme- tion. Both work fine, howev- ly low latency Hub and a spe- er they are based on different cial MAC, which can reply to paradigms. IXXAT GmbH Leibnizstr. 15 · 88250 Weingarten Tel.: +49 751 56146-0 Member of the HMS group Internet: www.ixxat.de