Communication
Profibus &
Profinet
Eng. Mostafa Magdy
Gharib Waly
Contents
1. ..................................................................................................................................................... 1
Profibus DP .................................................................................................................................... 1
1.1 Introduction .......................................................................................................................... 1
1.1.1How to assign an address to a Profibus device .............................................................. 2
1.1.2 Communication port parameter..................................................................................... 2
1.2 Cables and Termination ........................................................................................................ 2
1.2.1 Cables ............................................................................................................................ 2
1.2.2 Bus Terminal Switch ..................................................................................................... 3
1.3 How to use Profibus with plc ............................................................................................... 4
1.3.1 ET200SP ........................................................................................................................ 4
1.3.2 Using ET200S module direct ........................................................................................ 5
1.3.2 Hybrid method............................................................................................................... 6
1.3.3 Redundant (using two ET200S) .................................................................................... 6
1.3.4 Connection Two PLC With Profibus ............................................................................. 7
2. ..................................................................................................................................................... 9
Profinet ........................................................................................................................................... 9
2.1 Introduction .......................................................................................................................... 9
2.2 Mechanism ......................................................................................................................... 10
2.2.1How PROFINET Employs TCP/IP .............................................................................. 10
2.2.2 Profinet Layer .............................................................................................................. 10
2.2.3 Cyclic and Acyclic ...................................................................................................... 11
2.2.4 Real Time (RT) and Isochronous Real Rime (IRT) .................................................... 11
2.2.5 Ethernet Frame ............................................................................................................ 12
2.3 PROFINET Configuration ................................................................................................. 13
Comparing between Profibus and Profinet .............................................................................. 16
1.
Profibus DP
1.1 Introduction
Profibus – Process Fieldbus
DP – Decentralized Periphery (I/O Modules)
Profibus DP is an Open Protocol, the standard is maintained by Profibus & Profinet
International (PI) [Link].
◼ A Profibus system uses a bus master to poll slave devices distributed in multi-drop
fashion on an RS485 serial bus.
◼ A Profibus DP network typically has only one Master device.
◼ Profibus is a master/slave protocol.
◼ The total maximum number of addressable devices that can be connected to a single
Profibus DP network is 32 and each device must have a unique address, to use more than
32 use Profibus repeater until 9 repeaters reach to 128 devices, repeater no address
Eng. Mostafa Magdy Gharib Waly Page | 1
1.1.1How to assign an address to a Profibus device
Software method: Using software programming
Hardware method: Using a key on the device through which you select the device’s address
Note:
1. Address 127 is used for broadcast. No Profibus DP Slave device should have this address.
2. Address 126 is the hardware address for slaves whose address is set using software.
3. Address 0 is reserved for the programming device (PC).
1.1.2 Communication port parameter
Baud Rate: Determines the speed of data transmission, typically ranging from 9600 to 12
Mbps.
Data Bits: Usually 8 bits per character (not change in Profibus).
Parity: Can be none, even, or odd, used for error checking (Always even in Profibus).
Stop Bits: Typically, 1 or 2 bits to signal the end of a data character (Always 1 in Profibus).
Note:
◼ When setting up the Baud Rate of the network, all you must do is to set the Baud Rate on
the Profibus DP master. When the network is started, all the Profibus DP slaves will auto-
detect the baud rate being used, and begin communication, this means that there is no
need to set the baud rate on any of the Profibus DP slave devices
1.2 Cables and Termination
1.2.1 Cables
Cable used in factories
Eng. Mostafa Magdy Gharib Waly Page | 2
Segment Length Baud Rate
Segment: the distance between two repeaters or the distance between PC and repeater
1.2.2 Bus Terminal Switch
How to use it
◼ It helps with connecting devices and disconnecting the device in case of a problem.
◼ Connector must be plugged into a powered device to enable bus termination.
Eng. Mostafa Magdy Gharib Waly Page | 3
1.3 How to use Profibus with plc
With long distances, we do not use wire to connection device with plc because of cost for that
using communication like Profibus
1.3.1 ET200SP
It is an interface model that is considered a complement to the PLC and connects to the I/O
cards.
◼ After connecting the I/O cards, a model server module must be used so that the device
knows that the cards have been connected.
◼ The first card must be potential card take 24v and supply the rest of the cards.
Note:
You may have more than one power card, the location of which is determined by the hardware
engineer. In most cases, the difference between each card and the next is 4 cards.
Eng. Mostafa Magdy Gharib Waly Page | 4
How to set address of device
Using Switch connected to ET200S With the address specified in the software
1.3.2 Using ET200S module direct
PLC In factory
ET200S
The device is at a
long distance
◼ Do not prefer this method because cutting the RS cable will lead to the system collapsing
Eng. Mostafa Magdy Gharib Waly Page | 5
1.3.2 Hybrid method
Some devices are connected to the PLC at the factory, and some are connected to the I/O
located at a long distance, and the I/O is connected to the PLC via the RS cable
◼ The same problem if cable disconnected loses some device
1.3.3 Redundant (using two ET200S)
In this method, two RS cables are used to connect two ET200S devices, so that we prevent
system collapse in the event of a cable break.
Eng. Mostafa Magdy Gharib Waly Page | 6
1.3.4 Connection Two PLC With Profibus
One PLC is master, and one is slave
Specify the address that will be sent from the master and that the master will receive from
the slave.
In Slave Properties
Eng. Mostafa Magdy Gharib Waly Page | 7
Code Send from master to slave
In Master OB1
In Slave OB1
Eng. Mostafa Magdy Gharib Waly Page | 8
2.
Profinet
2.1 Introduction
PROFINET (Process Field Network) is an industry technical standard for data communication
over Industrial Ethernet. It's designed for collecting data from, and controlling equipment in
industrial systems, with a particular strength in delivering data under tight time constraints.
◼ PROFIsafe: A safety protocol ensuring secure data exchange, connected to the
PROFINET network.
◼ IO-Link: A point-to-point communication protocol for sensors and actuators, connected
to the network.
◼ HART: A protocol for smart field devices, connected to the network to ensure
comprehensive data exchange.
Eng. Mostafa Magdy Gharib Waly Page | 9
2.2 Mechanism
◼ IO-Controllers: These are the central units (such as PLCs, DCSs, or IPCs) that manage
the communication within the network.
◼ IO-Devices: These are the field devices (such as sensors, actuators, and I/O modules) that
interact with the IO-Controllers.
◼ Communication Channels: PROFINET employs different communication channels to
handle various types of data exchange, including TCP/IP for non-time-critical tasks and
Real-Time (RT) and Isochronous Real-Time (IRT) for time-critical communication.
2.2.1How PROFINET Employs TCP/IP
PROFINET employs TCP/IP (Transmission Control Protocol/Internet Protocol) primarily for
non-time-critical tasks. This allows PROFINET to take advantage of the reliability and wide
adoption of TCP/IP for specific types of communication within an industrial network.
2.2.2 Profinet Layer
PROFINET leverages the ISO/OSI model to structure its communication protocols, ensuring
efficient and reliable data transfer within industrial automation systems.
Eng. Mostafa Magdy Gharib Waly Page | 10
2.2.3 Cyclic and Acyclic
PROFINET, communication can be classified into cyclic and acyclic types.
Cyclic Communication
• Purpose: Used for regular, consistent data exchange.
• How It Works: Data is transmitted at regular intervals, regardless of whether the data has
changed. This ensures a predictable and reliable communication pattern, which is crucial
for real-time control processes.
• Example: An IO-Controller regularly polls data from IO-Devices to monitor sensor
values and control actuators in a production line.
Acyclic Communication
• Purpose: Used for sporadic, on-demand data exchange.
• How It Works: Data is transmitted only when needed, such as for diagnostics, parameter
changes, or configuration tasks. This type of communication is less predictable but more
efficient for tasks that do not require constant updates.
• Example: A maintenance engineer sends a request to an IO-Device to retrieve diagnostic
information or change parameter setting.
2.2.4 Real Time (RT) and Isochronous Real Rime (IRT)
The time varies depending on the application used, as shown in the following image.
Eng. Mostafa Magdy Gharib Waly Page | 11
Real Time
◼ Purpose: RT is designed for standard automation tasks that require timely and
deterministic data exchange.
◼ Performance: It provides predictable communication with typical cycle times ranging
from a few milliseconds to tens of milliseconds.
◼ Usage: RT is suitable for tasks such as monitoring and controlling sensors and actuators,
where consistent updates are important but not extremely time sensitive.
o Example: In a manufacturing plant, RT is used to monitor the status of conveyor
belts, sensors, and other equipment to ensure smooth operation.
Isochronous Real-Time (IRT)
◼ Purpose: IRT is used for applications that require extremely precise and synchronized
communication, often down to the microsecond level.
◼ Performance: It allows for highly deterministic communication with cycle times as low
as sub-millisecond.
◼ Usage: IRT is ideal for high-performance applications such as motion control, robotics,
and synchronized multi-axis movements.
o Example: In a robotic assembly line, IRT ensures that all robotic arms and
equipment operate in perfect synchronization to achieve precise and coordinated
movements.
2.2.5 Ethernet Frame
◼ Preamble (7 Bytes):
o Purpose: Synchronizes the receiving device's clock with the sender's clock,
ensuring proper timing for the data transmission.
◼ Start Frame Delimiter (SFD) (1 Byte):
o Purpose: Indicates the start of the frame.
◼ Destination MAC Address (6 Bytes):
o Purpose: Specifies the MAC address of the receiving device.
o Details: Unique identifier for the network interface of the destination device.
Eng. Mostafa Magdy Gharib Waly Page | 12
◼ Source MAC Address (6 Bytes):
o Purpose: Specifies the MAC address of the sending device.
o Details: Unique identifier for the network interface of the source device.
◼ Ether Type (2 Bytes):
o Purpose: Indicates the protocol type being carried in the payload.
o Details: Examples include 0x0800 for IPv4, 0x0806 for ARP, and 0x86DD for
IPv6.
◼ Frame Check Sequence (FCS) (4 Bytes):
o Purpose: Ensures data integrity by verifying that the frame has not been corrupted
during transmission.
o Details: A cyclic redundancy check (CRC) value calculated from the frame's
contents.
2.3 PROFINET Configuration
1- Two PLC With different IP
2- Allow PUT/GET Communication on PLC
Eng. Mostafa Magdy Gharib Waly Page | 13
3- Connection PLC
4- PUT Block (Used to send data)
o ADDR_1: Pointers to the areas on the partner CPU to which the data will be
written.
Example: P#DB10.DBX5.0 Byte 10.
o SD_1: Pointers to the areas on the local CPU which contain the data to be sent.
◼ Configuration PUT Block
Eng. Mostafa Magdy Gharib Waly Page | 14
5- Get Block (Receive data)
ADDR_1: Pointers to the areas on the partner CPU that are to be read.
RD_1: Pointers to the areas on the local CPU in which the read data is entered.
Eng. Mostafa Magdy Gharib Waly Page | 15
Comparing between Profibus and Profinet
Eng. Mostafa Magdy Gharib Waly Page | 16