by Jan Kiszka and Robert Schwebel, published in A&D Newsletter, October 2004
The word real-time Ethernet is often associated with different solutions of well-known automation system manufacturers. Many of these processes that comply with hard real-time demands compete for the shortest cycle time or the most accurate time synchronisation. It is quite obvious that specially adapted hardware components are necessary with respect to the inherent indeterministic properties of this medium. These may be real-time switches, network adapters with high innate intelligence or even fundamentally revised Ethernet controllers. However, is the research on cycle times in microsecond areas for the wide range of industrial applications worth the effort?
Some providers implicate an answer to this question about the necessity for more flexible solutions by offering processes for lower real-time demands that meet with standardised components. In contrast to hardware-based solutions, these software-based solutions often show the problem of only being reliable in well dimensioned and controlled load situations concerning the maximum transmission time. This soft real-time compliance is brought about by the usage of TCP/IP for time-critical data, the insufficient coordination of media usage or simply the application of non-real-time compliant operating systems on the network nodes.
The project RTnet was founded at the University of Hannover for two reasons:
RTnet provides a framework that features protocols and tools for configuration, operation and diagnosis of real-time Ethernet networks. It offers hard real-time via unmodified Ethernet components, as they can be found in the smallest embedded controllers, in industrial computers or even in appropriate office computers. On demand, the participants can be connected up to star and bus topologies with standard switches or hubs.
As RTnet aims for real-time compliance without specific hardware-support, closed networks are necessary wherein the participants follow the given protocol. In order to still ensure the accessibility of the isolated participants, RTnet offers the possibility to tunnel time-uncritical communication through the real-time network. A gateway to other networks provides the full access to participants in the RTnet network via stream-oriented protocols such as TCP/IP. In this way, diagnosis and maintenance tasks can be carried out furthermore, e.g. via a web interface of a browser.
In conventional Ethernet networks, indeterministic behaviour emerges through collision: When two stations try to send simultaneously, this is recognised and a new sending attempt is undertaken after a random waiting period. On the one hand, RTnet reaches real-time compliance through the precise control of the sending point in time of messages. Thus, collisions on the network are avoided and overload of singular participants or infrastructure components prevented that cannot be ruled out by the exclusive use of standard switches. A modularly integrated access process decides on which protocol the media access follows. RTnet offers a Time Division Multiple Access (TDMA) with the ongoing version that assigns a fixed time slot to each participant. The participants are synchronised by a master that signals the start of a new cycle periodically with a Start of Frame message. Along with the Start of Frame package, the times of the participants are synchronised. According to their priority, the packages-to-send are sorted on the participant nodes. The lowest priority level is assorted to time-uncritical data such as TCP/IP packages, so that they are only transmitted when they do not hinder time-critical communication.
On the other hand, RTnet reaches hard real-time features with strongly deterministic implementation of the protocol stack. Conventional protocol stacks show a considerable amount of competitively used resources such as data buffers, CPU time, logical addresses or incoming queues. In order to ensure a load-independent reactivity of the stacks, critical components were thoroughly optimised regarding the maximum execution time. Thus, RTnet can offer a real-time compliant realisation of UDP/IP, ICMP and ARP. In this way, it is ensured at any rate that a package is physically located on the cable in deterministic time while being sent from an application. Special demands are posed by the starting of a real-time compliant network with cyclic data-traffic. The configurations of the participants have to be distributed as well as their function supervised. RTnet realises this by using the so-called RTcfg protocol. It allows a central expostulation of all network parameters and their distribution to newly connected participants without violating the real-time requirements. Additionally to the RTnet-specific settings, common and user defined data such as operation parameters or programs can be transferred. RTcfg was developed as a self-contained component within the RTnet framework and is independent of the used transport protocol or media access discipline. It especially supports access processes to exchange damaged or to-be-configured participants without interrupting the running real-time operation.
RTnet provides its real-time communication services vie a BSD socket interface, as can be found in every modern operation system, to keep the development of individual real-time applications simple. This enables a fast entrance into the development and facilitates the porting of existing software at the same time. Real-time applications can use package-oriented services such as UDP/IP or raw Ethernet: RTnet is not determined on certain high level protocols but simply offers a transmission channel with guaranteed bandwidth.
Furthermore, higher communication protocols can be easily stacked on RTnet. For example, ORTE is a realisation of the RTPS standard (Realtime Publish&Subscribe) that works with RTnet. Further plans are to join CORBA with RTnet: As a middleware, CORBA can make sure that distributed application can be developed regardless of the subjacent operation system, the hardware architecture as well as the transmission channel.
A prerequisite for the use of RTnet is a hard real-time compliant system platform. The currently available reference implementation is based on Linux and the real-time extension RTAI. Linux is especially suitable for arising time-uncritical tasks such as routing, connecting to LAN, wireless or dial-in networks, or human-machine interface and remote maintenance via web interface because of the largely available software. Concerning hardware, the reference implementation supports x86 and PowerPC platforms as well as a large amount of established Ethernet controllers. The Ethernet connection is based on slightly modified Linux drivers so that an integration of additional hardware is possible with low effort. Furthermore, RTnet protocols are not at all bound to Linux. They can also be ported to Ethernet compliant embedded controllers.
RTnet emerged from an open development process as free software and will be continued in this framework, driven by the demands of the users. The communication protocols are openly visible and can be used in individual implementations free of license fees. Within a short time, the free availability of the reference implementation has led to an intensive exchange with other research and industrial projects. This has made the interoperability with different software packages possible.
RTnet’s strong points are especially brought out when individual adaptability to special problems and demands of a development project is needed. The Open Source license enables a flexible adaptation of the code to the constraints of the user that is often impossible to realise with a predetermined proprietary solution. As the user has full insight into the source code and the applied mechanisms, there is a long-term investment protection which is extremely important in application from the fields of (custom) machine building. In addition, hardware manufacturers have the possibility to realise real-time compliant communication subsequently without having to change a existing control with Ethernet connection.
The RTnet roadmap shows that a range of further interesting features is planned for the future such as the new version of the TDMA protocol that enables hot plugging, fallback master and optimised time stamp. Furthermore, the development team works on a better documentation and specification of the applied protocols.