iCC 2005 CAN in Automation

CANopen on real-time

Andreas Pfeiffer, Standardization Group

Both CAN- and Ethernet-based networks are widely deployed in millions of nodes and applications world-wide. CAN was initialy developed for automotive and is nowadays very popular in the automation industry, too. For many years, Ethernet based networks are used in automation on higher levels. Due to newly developed real-time protocol extensions, this IT network technology becomes more and more popular on sensor and actuator level as well. CANopen is one of the most extensive selection of industrially applied device and application profiles. So far it was only used on CAN bus systems. With the growing demand for Ethernet on machine level, it was logical to integrate CANopen with Ethernet protocols in general and real-time Ethernet in particular

Motivation for send devices on a network segment first check if any other data is currently being Due to the worldwide deployment of transmitted on the network. If this is not Ethernet in office environments, there is the case, one or more devices start increasing demand for using this sending their data. If there is more than technology for networking time-critical one device trying to gain access, a embedded applications, too. Seamless collision occurs. Thus the data telegrams transparent communication from within the are not valid anymore and the devices application to the outside world, based on involved interrupt their transmission. After one single standard, device availability and familiarity with this technology are the main advantages. However, there are some technical issues to be solved in order to use Ethernet for real-time applications.

Ethernet and Real-Time

Current Ethernet standards promise Picture 1 CSMA/CD mechanism of transfer speeds of 100Mbit/s ( Ethernet) and more (e.g. Gbit Ethernet). a randomly calculated delay, each device This is significantly faster than most of the starts checking the network again for free established systems and access. embedded networks. Therefore Ethernet also seems to be a good choice for The random delay should reduce the connecting industrial devices with hard probability of further collisions. If real-time requirements. However, subsequent collisions occur, delays for the deterministic behaviour of data transfer is involved nodes will be incremented sometimes more crucial than the simple respectively. It is obvious that this method network bandwidth. With Ethernet in is not suitable for real-time networking. particular, data communication can be delayed unpredictably. This is not ETHERNET Powerlink Introduction acceptable for dynamic applications like in industrial control. ETHERNET Powerlink is a standards The reason for Ethernet being non- based real-time Ethernet system deterministic is its stochastic media (EtherType 88ABH). It was introduced to access mechanism CSMA/CD (Carrier the market in 2001 and is used in serial Sense Multiple Access /Collision Detect, machinery and process automation Picture 1). With this method, all ready-to- worldwide. ETHERNET Powerlink is 12-9 iCC 2005 CAN in Automation managed by the EPSG (ETHERNET Powerlink Standardization Group), an Non-Real-Time Domain open vendor and user group. The protocol can be implemented on standard hardware. No proprietary ASICs are needed. Standard Ethernet network components, like fiber-optic can also be used with ETHERNET Powerlink. ETHERNET Powerlink meets timing demands typical for high performance industrial applications like in automation and motion control. Current implementations have reached 200µs cycle time with a timing deviation (jitter) below 1µs. Until now, this was only Real-Time Domains possible with dedicated motion bus systems. Due to its standard compliancy it is Picture 2 ETHERNET Powerlink Networking possible to leverage standard test and Domains measurement equipment with ETHERNET Powerlink. In particular the following standards are used with ETHERNET Physical and Powerlink:  IEEE 802.3 Fast Ethernet The protocol is based on the standard  IP-based protocols IEEE 802.3 layers according to ISO/OSI  CANopen EN50325-4 (Picture 3). The current is 100BASE-X (see IEEE 802.3). In the  ISO 15745-4 device description future however, it could also be based on language  faster Ethernet variants such as Gbit Any Ethernet chip and hardware Ethernet, if necessary.  IEEE 1588 in future extensions

ETHERNET Powerlink Network Structure

ETHERNET Powerlink distinguishes between real-time domains and non real- time domains (Picture 2). This separation matches typical machine and plant concepts. It also satisfies the increasing security demands to prevent hacker attacks at the machine level or harm through erroneous data communication on higher network hierarchies. True real-time requirements are met within the real-time domain. Less time critical data is routed transparently between the Picture 3 ETHERNET Powerlink ISO/OSI real-time domain and non-real-time Layers domain using standard IP frames. A clear boundary between a machine and factory To minimize path delay and frame jitter it network prevents potential security flaws is recommended to use repeating hubs instead of switching hubs within the real- from the very beginning while keeping full time domain. ETHERNET Powerlink data transparency. references the IAONA Industrial Ethernet Planning and Installation Guidei for proper wiring of industrial networks. Both RJ45

12-10 iCC 2005 CAN in Automation and M12 industrial Ethernet connectors CANopen, like the target applications, are specified. operating principles, component suppliers Deterministic timing is achieved by and the organsiations behind it. Both applying a cyclic timing schedule for all groups therefore came quickly to an connected nodes to access the physical agreement to integrate ETHERNET layer (Picture 4). The schedule is divided Powerlink with CANopen profiles in a joint into an isochronous phase and an technical working group. The goal was to asynchronous phase. During the offer complete uniformity, extending from isochronous phase, time-critical data is simple sensors and high-speed drive transferred, the asynchronous phase systems to Ethernet-based factory reserves bandwidth for non time-critical networks. By using CANopen profiles, data. The Managing Node frees access to machine builders are provided with an the physical medium via explicit easy migration path between CANopen messages. As a result, just one single and ETHERNET Powerlink and vice versa. node has access to the network at all Inexpensive gateways should make it times, thereby preventing collisions. The possible to integrate ETHERNET CSMA/CD mechanism, which causes non- Powerlink subsystems with CANopen deterministic Ethernet behavior, is not networks and to connect CANopen activated when ETHERNET Powerlink networks to ETHERNET Powerlink operates free of disturbances. networks. There are a number of further requirements for a communication system arising when distributed automation systems shall be built with different types of devices or devices from different manufacturers : Picture 4 ETHERNET Powerlink Basic Cycle  Network Management: A common mechanism for controlling and monitoring the network consistency during boot-up and runtime of the Protocol Requirements network  Manufacturers and users are looking on Object Dictionary and Device interoperability and exchangeability of Model: A common method for devices from various manufacturers. A specifying and referencing data, broad component market with plenty of parameters and functions of a alternatives and second sources enables certain device or device type provides to the system them to produce competitive automation  solutions without depending on unique or Error Signalling: A common proprietary systems. method for signaling errors and indicating error conditions to the The objective of independence can only system independent of the device be achieved by using standard solutions type or manufacturer which provide widely understood and used  Process Data Object – PDO: A data exchange mechanisms. CANopen, as common mechanism enabling the application layer (layer 7) for CAN user to specify the data exchanged systems, has already proven the market between different devices power of a standardized, vendor  Service Data Object – SDO: A independent standard which gives common mechanism for numerous device manufacturers the transmitting larger amounts of opportunity to participate in sophisticated arbitrary data like configuration communication mechanisms. data In 2003, the EPSG had to decide for an  Device Profiles: Standardized application protocol to be put on top of the definitions of data, parameters and existing lower ETHERNET Powerlink functions for certain device types layers. There were many similarities between ETHERNET Powerlink and 12-11 iCC 2005 CAN in Automation

like drives, I/O modules, encoders, the isochronous period of the ETHERNET PLCs, etc. Powerlink Cycle using a For the EPSG, all these requirement were Consumer/Producer oriented perfectly met by CANopen. communication model. In ETHERNET Powerlink there is only one TxPDO Integrating CANopen with ETHERNET capable of transfering up to 1490 bytes of Powerlink net data (Picture 6). Due to the limits of the sub-index, there is a maximum of 254 In the joint technical working group of the data octets within one PDO.

EPSG and CiA CANopen’s DS301 and Ethernet ETHERNET PDO Ethernet Powerlink Header Version res Size PDO-Objects CRC DS302 communication profiles have been Header integrated with ETHERNET Powerlink. ETHERNET Powerlink can tranfer up to Picture 6 ETHERNET Powerlink Frame 1490 byte net data per frame. Therfore Format for PDO Transfer there is only one Transmit PDO (TxPDO) in ETHERNET Powerlink. The adaption of Each device is able to communicate its CANopen to ETHERNET Powerlink was process data directly with all other devices therefore only necessary for the mapping in the system. The contents of a PDO of the process data. Other joint areas of (process data which is to be transmitted or work are the device description language. received) can be configured during system Every ETHERNET Powerlink device is start-up. This allows to optimise and adjust described by the standardized CANopen the real-time data exchange to the Device Model (Picture 5)with its central requirements of the application. The real- element, the Object Dictionary, containing time critical data is transmitted in PDOs a list of descriptions of all data, without any overhead. parameters and functions of the device that can be accessed or controlled Service Data Objects and ETHERNET remotely via Ethernet. Furthermore, all Powerlink configurable communication parameters are listed in the Object Dictionary. By The exchange of parameters, functions, means of the Object Dictionary each data files or less real-time critical process data of a device can be easily accessed form is handled by Service Data Objects (SDO). any device of the network by a unique 24- SDOs are based on a Client/Server bit reference consisting of a 16-bit index oriented communication model where and a 8-bit sub-index. every device can access or can be

Object Application accessed from any other device by an Communication Dictionary SDO. SDO Addressing is done with

State machine Application index/sub-index numbers or via names. object

Entry 1 An SDO allows a client to implicitly Comm. object Entry 2 address any entry in the Object Dictionary Comm. : Application object object of the server. The length of data to be

Comm. Application transferred is not limited. SDOs are object object transferred either via UDP/IP datagrams Entry n Comm. Application (Picture 7), directly in the ETHERNET object object Powerlink asynchronous frame or in a container within a PDO. Bus system Process

Picture 5 CANopen Device Model

Process Data Objects and ETHERNET Powerlink

Real-time critical exchange of process data is handled by the Process Data Objects (PDO). PDOs are transmitted in

12-12 iCC 2005 CAN in Automation

Layer model Telegram structure

EPL- EPL Application Command Command Data Layer Layer Network Migration and Integration

EPL- EPL Sequence Message Data Type Sequ. Layer Transport Since the ETHERNET Powerlink

UDP Data Application Layer provides the same mechanisms as CANopen, all CAN device Network Ethernet Ethernet IP Data DLL Header CRC profiles can directly be reused. Thus a

UDP/IP datagram wide range of profiles for different device types, like I/Os, encoders or drives, and applications already exists. Picture 7 SDO transfer via UDP/IP Users and vendors of CANopen enabled Since SDOs can be transmitted using devices are able to migrate their UDP/IP, an ETHERNET Powerlink device applications from the well established CAN can also be accessed via generic Internet bus to an Ethernet environment which is in which is connected via a router with the principle a hundred times faster. ETHERNET Powerlink real-time domain. Furthermore, CAN bus and Ethernet networks can transparently be combined Network Management wherever needed.

The ETHERNET Powerlink network Implementing ETHERNET Powerlink management describes the mode of operation, state transitions and boot-up ETHERNET Powerlink can be behaviour of a device. The network implemented on any standard Ethernet manager in the managing node is silicon. How it is implemented most responsible for system consistency checks efficiently depends on the individual during boot-up and for monitoring the requirements, guidelines and preferences. status of all devices during run-time. The The device manufacturer is free to decide communication behaviour of each if an ETHERNET Powerlink stack runs in ETHERNET Powerlink device is defined the software on the preferred processor, a by a local state machine which is system-on-chip approach is used, or an controlled by certain system events and by FPGA or ASIC is developed. The commands from the Network Manager. properties of the technology are open. For the initial testing, prefabricated evaluation Configuration Management boards are available on various processor architectures, like ARM, XScale, The Configuration Manager is the central ColdFire,166 or Hyperstone. intelligence in an ETHERNET Powerlink system, which is able to maintain the Further Development configuration data for its application and all devices locally and download the ETHERNET Powerlink provides a configuration data during system startup. standard protocol for Fast Ethernet, which This approach enables the set-up of has proven its real-time characteristics in plug&play systems which allow initial thousands of applications (Picture 8). The installation and replacement of failed EPSG ensures openness and continuous devices very easily. advancement. Based on mature standards the EPSG is working on further XML Device Description development of the specifications to add even more capabilites in areas like safety, For describing an ETHERNET Powerlink security or system redundancy. Like it was device, a standardized file format is under with the integration of ETHERNET development in form of an XML-based Powerlink with CANopen, ease-of-use and Electronic Data Sheet (EDS). The work is openness will continue to be the focal done together with other organisations in point for any future additions. an ISO working group developing the ISO 15745-4 standardii. 12-13 iCC 2005 CAN in Automation

Picture 8 Example of a Packaging Machine networked with ETHERNET Powerlink

Conclusion

Integrating CANopen with ETHERNET Powerlink offers complete uniformity, extending from simple sensors and high- speed drive systems to Ethernet-based factory networks. By using CANopen profiles, machine builders are provided with an easy migration path between CANopen and real-time Ethernet and vice versa.

Andreas Pfeiffer EPSG - ETHERNET Powerlink Standardi- zation Group B&R Industrie-Elektronik, B&R Strasse 1, A-5142 Eggelsberg, Austria Phone +43 7748 6586 1023 Fax +43 7748 6586 1009 [email protected] www.ethernet-powerlink.org i IAONA Industrial Ethernet Planning and Installation Guide: www.iaona-eu.org ii ISO 15745-4 Industrial automation systems and integration — Open systems application integration framework — Part 4: Reference description for Ethernet-based control systems

12-14