Profinet Vs Modbus
Profinet Vs Modbus
Comparison
of
PROFINET
Bachelorarbeit
Wintersemester 2010/2011
Johannes Kasberger
0616782
johannes.kasberger@tuwien.ac.at
Betreuung
Ao. Univ. Prof. Dr. Wolfgang Kastner
Erklärung
Hiermit erkläre ich, dass ich diese Arbeit selbständig verfasst habe, dass
ich die verwendeten Quellen und Hilfsmittel vollständig angegeben habe
und dass ich die Stellen der Arbeit – einschließlich Tabellen, Karten und
Abbildungen –, die anderen Werken oder dem Internet im Wortlaut oder
dem Sinn nach entnommen sind, auf jeden Fall unter Angabe der Quelle
als Entlehnung kenntlich gemacht habe.
Hereby I declare that this work has been written autonomously, that all
used sources and utilities are denoted accordingly and that these points
of the work - including tables, maps and figures - which where taken from
other creations or the Internet have been marked as borrowing by quoting
the original sources.
i
Contents
Erklärung i
Contents ii
Abstract iv
1 Industrial Communication 1
1.1 Automation Pyramid . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Fieldbuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Industrial Ethernet . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 Other layers . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.4 Beginning of Ethernet Wars? . . . . . . . . . . . . . 6
3 PROFINET 14
3.1 PROFINET CBA . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 PROFINET IO . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.1 Cyclic Communication . . . . . . . . . . . . . . . . . 16
3.2.2 Acyclic Communication . . . . . . . . . . . . . . . . 19
3.2.3 Addressing . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.4 Network Topology . . . . . . . . . . . . . . . . . . . 20
3.2.5 Web Integration . . . . . . . . . . . . . . . . . . . . 20
3.2.6 Security . . . . . . . . . . . . . . . . . . . . . . . . . 20
ii
3.2.7 Fieldbus Integration . . . . . . . . . . . . . . . . . . 21
4 Conclusion 22
Bibliography 26
List of Tables
List of Figures
iii
Abstract
The topic of this work is Industrial Ethernet and why it is developed and
used. In the recent years fieldbuses have been used to connect devices
on the factory floor. Now it seems that the next step in development is
taking place. The classic fieldbus protocols can’t satisfy today’s require-
ments and so modern protocols are stepping in. A promising approach is
to build solutions using Ethernet as base. This work tries to summarise
why fieldbuses are so successful and what steps have to be taken to use
Ethernet as a replacement.
After the introduction two representatives of this protocol class are
compared. The two protocols are Modbus over TCP/IP and PROFINET.
Modbus over TCP/IP is an extension of the popular Modbus protocol to
replace the serial connection with TCP/IP. PROFINET is the successor of
PROFIBUS and can be split up into PROFINET CBA and PROFINET IO.
iv
1 Industrial Communication
1
CHAPTER 1. INDUSTRIAL COMMUNICATION 2
1.2 Fieldbuses
This section is based on [16] and [6]. The development of fieldbuses started
around 1981. The goal was “to solve some end-user problems, coming
from the heterogeneity of their devices” [16, p. 82]. Many companies
started developing their own protocols. Their approaches were different
at a very basic level.
“PROFIBUS was based on a distributed control idea and in its orig-
inal form supported an object-oriented vertical communication accord-
ing to the client-server model in the spirit of the MAP/MMS specification.
FIP, on the other hand, was designed with a central, but strictly real-
time capable control scheme and with the newly developed producer-
consumer (producer-distributor-consumer) model for horizontal com-
munication” [6, p. 73].
Thomesse also agrees on that two different points of view what kind
of problem a fieldbus should solve: “a fieldbus is only a network for sim-
plifying the wiring between devices, or a fieldbus is the spinal column of
a distributed realtime system” [16, p. 81].
A list of common end-user requirements for fieldbuses as described in
[16, p. 83] is:
• better maintainability
• lower costs
Although the end-user requirements are equal for all fieldbuses at least
50 different fieldbus protocols were developed. France (FIP) and Ger-
many (PROFIBUS) developed their own national standard and wanted
CHAPTER 1. INDUSTRIAL COMMUNICATION 3
WorldFIP PROFIBUS
P Net Interbus
AS-Interface SERCOS
LonWorks MVB
MIL-STD 1553 DeviceNet
SDS CAN
• time-deterministic communication
• low-speed class for human control, delivery times around 100 ms,
which can be fulfilled with a standard TCP/IP system
• second class for process control, delivery times around 10 ms, pow-
erful equipment to handle TCP/IP in real-time or simplified proto-
col stack on normal equipment
• third class for motion control, delivery times around 1 ms, jitter not
more that 1 µs, only reachable with modified hardware and modified
MAC (Medium Access Control)
1.3.1 Ethernet
Ethernet and the IEEE standard 802.3 have little difference and compat-
ibility was guaranteed. To share one medium between more devices, a
MAC algorithm named Carrier-Sense Multiple Access With Collision De-
tection (CSMA/CD) is used in both. This algorithm is the reason for the
indeterministic behavior of data transmission. When a station wants to
send data it waits until the medium is free for a time span called the inter-
frame gap. After that time interval of no traffic the station starts sending.
When more than one station starts sending a collision arises. This is de-
tected by the stations. To notify all stations of this collision, a jamming
signal is sent. Now the station chooses a random time to wait before trying
to send again. With each collision this time is doubled. Each station with
CHAPTER 1. INDUSTRIAL COMMUNICATION 5
data to send waits this randomly chosen time and starts sending again.
This procedure is repeated until the data is sent. [3, p. 1105]
Because of this behavior no upper bound for the transmission time can
be given. Under heavy load conditions it is possible that the MAC results
in unfair results.
“The Ethernet Capture Effect is the behavior wherein under high load,
one station is able to hold on to the channel to transmit packets consec-
utively, in spite of other station(s) contending for access. This is partic-
ularly acute in the case of a 2-node network, with one station receiving
an unfair share of the channel bandwidth over a transient period.” [14,
p. 228]
1.3.3 Solutions
To avoid the random behavior of the normal Ethernet MAC algorithm,
several different solutions have been developed. Some can be used in a
network of standard Ethernet devices others are not useable in such a sce-
nario. From this point of view, real-time Ethernet can be divided in two
CHAPTER 1. INDUSTRIAL COMMUNICATION 6
This category alters the MAC algorithm. Thus, these nodes can’t commu-
nicate with standard devices. The big advantage of low priced hardware
would be worthless if this approach requires totally new hardware. But
it is possible to create new solutions on base of IEEE 802.3 compliant
hardware.
Nodes that implement such solutions can coexist with standard Ether-
net devices in the same network and communicate with each other. It
is possible to distinguish two more classes. The homogeneous subclass
only guarantees to fulfill the requirements when all devices implement the
same features. The second subclass the heterogeneous gives guarantees
to fulfill the requirements even in presence of nodes with other Ethernet
modifications. [3, p. 1109]
all with different approaches and techniques. The question is if this will
lead to a similar deadlock situation as during the fieldbus wars?
The opinion in [7, p. 419] is that history won’t repeat itself. The au-
thors think that the IEC can’t afford a new standardization war which
would result in image loss. The vendors have also learned that block-
ing the standardization for a long time just results in compromises and
is very expensive. Furthermore, the IEC workgroups don’t search for one
standard but search for a multipart solution. As a result, it is expected
that the standardization process will go by smoothly.
In IEC 61784-2 [8] and [5] the following solutions are listed:
8
CHAPTER 2. MODBUS OVER TCP/IP 9
There are well defined public functions codes but it is also possible to de-
fine own function codes.
Modbus over TCP/IP defines the ADU as the standard PDU and a
MBAP Header (Modbus Application Protocol). This header provides in-
formation needed for sending data over bridges, routers and gateways to
distinguish between multiple Modbus devices that use the same IP ad-
dress. It also adds a message length information to recognize the message
boundaries. [10, p. 5]. The frame is shown in Figure 2.2.
The underlying data model is simple to describe. There are singe bits
and 16-bit words that can be read and written. Read-only bits are called
Discret Inputs and read-write bits are called Coils. Read-only words are
called Input Registers and read-write words are called Holding Registers.
CHAPTER 2. MODBUS OVER TCP/IP 10
These different regions are not necessary different memory regions but
can also overlap each other. It is possible to access the same memory bit
wise or word wise.
So each PDU contains a function code and an address the function
should apply to. Each data in a PDU is addressed from 0 to 65535. The
mapping of these addresses to actual data in the memory is totally vendor
specific.
The device that sends the request is called master but in terms of the
TCP communication it is a client. The device reacting to the request is
called slave with typical server functionality.
The normal error free communication follows this procedure. The
master/client initiates a request to the slave/server. The slave performs
the action and initiates the response that is received by the master. The
response function code is the same as in the request.
Error handling is also accomplished over the PDU frame. Several er-
rors can occur on the Modbus layer:
2.1.1.1 Request
A master wants to read four register values starting from the address 0x15.
In the PDU, registers are addressed starting at zero so the request must
be from address 0x14. (see Table 2.1)
2.1.1.2 Response
The slave receives this request and reacts according to it. It adds 1 to
the starting address and maps it into its real memory. In this example,
these four registers contain the values 0x1515 0x1616 0x1717 0x1818. The
master receives these values and this request is completed. (see Table 2.2)
In Modbus over TCP/IP these principles are the same. There are sev-
eral additional points a developer has to consider. The standard port for
Modbus over TCP/IP is 502 and the management of the TCP connections
and the parameterization of the TCP stack must be taken care of. The
connection management can be done in the Modbus module or the user
application. These aspects are described in the Modbus Messaging Im-
plementation Guide [10].
14
CHAPTER 3. PROFINET 15
3.2 PROFINET IO
In PROFINET IO, several IO-devices are connected to an IO-controller.
This controller has a similar functionality as a PROFIBUS master. The
creation of a PROFINET IO system has the same look and feel as the cre-
ation of a PROFIBUS system. The main goal is to access the data of the
devices fast and reliable. To offer these real-time features, PROFINET
IO defines four real-time classes. Standard TCP and UDP traffic is still
available.
ing order. In the other frames is no strict sending order defined. These
frames are called RT (real-time) and NRT (none real-time).
RT traffic is transferred without TCP/IP information in an Ethernet
frame with the frametype 0x8892. Real-time traffic is based on the
producer-consumer model and the reception of a message is not acknowl-
edged. The VLAN tag is used to define priorities. This technique is speci-
fied in IEEE 802.1Q and allows assigning priority codes to devices. With
this information the switch can recognize high priority packets and de-
liver them faster. The switches used must support this tag. Otherwise no
special hardware is required for RT traffic. [13, p. 10] Figure 3.2 provides
an illustration of the timeframes.
device supports this class. In this class the beginning of a bus cycle is not
defined. Standard Ethernet switches can be used.
3.2.3 Addressing
Each device has a symbolic name that is connected to a MAC address.
The IO-controller maps an IP-address to a MAC address based on that
symbolic name.
Beside of that each device has different slots. A slot represents a de-
vice. Each slot can have multiple subslots which can be read bit, byte or
word wise. Each subslot represents a connection to the process the de-
vices is controlling or observing. This numeric value of those subslots is
1
“in case of a fault a smooth switchover to other communication paths is possible”
[13, p. 26]
CHAPTER 3. PROFINET 20
3.2.6 Security
As it is possible to communicate with the devices over the Internet and it
is possible to support Web integration steps must be taken to ensure the
security in a plant. The devices themselves do not implement a security
concept. Thus everyone has access to the data. To avoid security issues
the network is split into separate segments and the data sent is controlled
by special switches. These switches ensure that only authorized traffic
reaches and leaves a segment. [13, p. 38]
CHAPTER 3. PROFINET 21
But the ways of achieving those common goals are quite different. Com-
paring Modbus over TCP and PROFINET seems actually a bit unfair at the
22
CHAPTER 4. CONCLUSION 23
first glance. Modbus over TCP offers just a very simple protocol to trans-
mit data from one device to another. PROFINET also offers this function-
ality. Additionally, PROFINET covers the development of plants as well
as the monitoring of a running network.
As PROFINET CBA and Modbus over TCP use Ethernet and IP for
communication both support the same address space when it comes to IP
traffic. This allows to build large networks. PROFINET IO uses for real-
time traffic only the Ethernet layer and so there are no IP addresses used.
The MAC address of each device is worldwide unique. This address space
can also be considered big enough for every purpose.
Addressing data in the device reveals differences. Modbus just de-
fines bit and word wise access and allows to address 65536 bits and 65536
words (from 0 to 65535). The address space of PROFINET is much big-
ger. There are 32767 slots where each slot may contain 32767 subslots.
Additionally, PROFINET defines more data types than Modbus.
When it comes to security Modbus over TCP and PROFINET share
a similar approach here. Security isn’t implemented in the devices. To
achieve access restrictions both protocols need special switches that ap-
ply the desired rules to the network traffic. So no protocol has a real ad-
vantage here.
PROFINET has a wider application range as it supports real-time trans-
mission. It is even capable to deliver traffic in the highest transportation
class called the isochronous real-time class. Modbus over TCP can’t com-
pete with PROFINET IO here. In terms of transportation class, it is more
comparable to PROFINET CBA.
But Modbus has also some benefits. It is a very simple protocol that
can be implemented fast and uncomplicated. At the same time, Modbus
is also powerful enough to fulfill the requirements of many applications.
PROFINET IO and CBA together are a more sophisticated protocol but
that brings more complexity along. With Modbus the development of
devices seems more flexible. This might be the reason why it is still so
successful.
CHAPTER 4. CONCLUSION 24
25
Bibliography
[1] PROFINET Overview, 11 2010. URL http://www.profibus.com/
technology/profinet/.
[4] Nicolas Falliere, Liam O Murchu, and Eric Chien. Symantec secu-
rity response w32.stuxnet dossier. http://www.symantec.com/
content/en/us/enterprise/media/security_response/
whitepapers/w32_stuxnet_dossier.pdf, November 2010.
[6] Max Felser and Thilo Sauter. The fieldbus war: history or short
break between battles? Proc. IEEE Int. Workshop Factory Com-
munication Systems, pages 73–80, 2002.
26
BIBLIOGRAPHY 27
[15] Jean Pierre Thomesse. Time and industrial local area networks.
Proc. 7th Annu. Eur. Computer Conf. Computer Design, Manufac-
turing and Production(COMPEURO’ 93), pages 365–374, 1993.