Comparison of Modbus Over TCP/IP and PROFINET
Two of the most common protocols are Modbus and Profinet. They are similar in many ways, but there are some crucial differences.
Industrial computer networking is the ability to allow data to be transferred between all of the devices in the facility with processors. Sometimes, communication ports are built right into the front of the processor modules, while other times is an add-on card or module. Regardless of the physical method, we must understand how the various protocols differ in order to build effective networks. Two of the most common are Modbus and Profinet - they can appear similar in many ways. Still, there must be some differences, or there would be no reason to purchase different communication modules.
If you work in a facility with cables sharing data between PLCs, motor drive units, HMIs, remote I/O distribution blocks, and most likely PCs, then you probably need to understand some of the basic network principles.
Many end devices, such as this VFD, require an adapter (the blue device) to take the application data of normal Modbus and wrap it up in the physical and transmission standards of Ethernet TCP/IP.
Industrial networking relies on coordination between three different parts of the communication message, the physical and transmission standards, and the application data - two of these are identical between Modbus and Profinet, the last one is where the difference occurs.
This includes the common term ‘Ethernet’ which is common in home and industrial networks. This part of the network is identical between Modbus and Profinet, and any other network relying on internet transmission and addressing protocols.
Ethernet is the physical standard that limits what types of connectors, wires, voltages, and speeds may be allowed to ensure compatibility. This means that any related protocol, including Modbus TCP/IP and Profinet, will be precisely the same in the area of physical specs.
The connector is quite recognizable as a square plastic plug with eight metal contacts and a locking tab. This is the Registered Jack 45 (RJ45). It appears in nearly all modern industrial processor-based equipment, although again, sometimes requires an add-on module.
A subtle but critical difference in the physical connectors - the larger 8-pin RJ45 at the top is for the Ethernet TCP/IP connection, but the smaller 6-pin RJ12 at the bottom is for the Modbus connection. Profinet is always RJ45.
Some equipment is switching to fiber-optic connections due to speed and electrical noise immunity, and the connector is slightly different. It usually looks like a side-by-side locking hole in the communication module with an optical transmitter and receiver hidden inside.
The transmission speeds are limited by the devices on each end and the network switches. Speed is usually 100 Megabit per second or 1 Gigabit per second on modern “gigabit’ switches.
This category is also the same between the Modbus and Profinet network types. This part of the network specification includes two pieces, the Internet Protocol (IP) and the Transmission Control Protocol (TCP), which is why the networks are listed as TCP/IP.
The Internet Protocol, which defines the addresses, are required to get to the proper network and device. Many documents can be found which explain IP addresses, subnet masks, gateways, and server addresses. Since these are globally standardized, proper addressing allows these devices to work right alongside any laptop or PC connected to the network switch.
The other piece, the Transmission Control Protocol (TCP), is the part that establishes what action should take to prevent data collision, and what should happen if an error does occur.
Once again, this part of the protocol is the same between all TCP/IP networks so that they may work alongside each other and never cause problematic data collisions and conflicts.
Finally, we reach the part of the communication which is different and specific to every module being used.
Modbus defines a header of information that tells the receiving device what data to expect. This header is 7 bytes (56 bits) which is relatively short and simple. The most dynamic info in the header is the length of the data - it tells the receiver how much information it’s about to send.
The actual data is limited to just a couple of possible types of commands:
-- Reading boolean inputs
-- Writing to (also reading from) boolean outputs
-- Reading register inputs (like analog inputs, integer calculations, or motor control values for example)
-- Writing to (also reading from) register outputs
Modbus is superior in its simplicity, short messages, and direct interaction with control devices like PLCs, and simple, integer-based network devices like VFDs and HMIs. Don’t expect to see Modbus in use between computers in the office to share information that usually doesn’t match that list above.
This PLC allows device connections for Ethernet using TCP/IP standards and an RS-485 for Modbus-specific communication.
Profinet shares the same characteristics of using a header to define a message length, but the type of data in the field of Profinet can be far more complex.
Industrially, much of the information is still just I/O data, so it seems that the complexity of Profinet doesn’t make it any better than the simple I/O and Modbus data sharing. Recall, however, that as technology advances, much more complex information must be shared - camera data for machine vision applications and much longer strings of information for large process control systems.
Therefore, it would be logical to see Profinet in use for larger networks with more complex data. It might be the preferred choice for systems that are likely to see sizeable future expansion. An example might be a processing facility with large PLC/PAC systems interfacing with robots and sending data to office PCs in remote locations.
Modbus may be a more likely choice for smaller, simpler networks with devices that don’t require large amounts of shared complex information such as a single small PLC with a few I/O devices interfacing with just a couple of VFDs for a simple machine center.
Industrial networks can be equated to talking on a radio. The physical devices are the actual handhelds, wires, and wireless signals. The transmission control helps to allow each person to speak without talking over others. Finally, the actual application is the language of the two people talking - it has nothing to do with the radio equipment itself. Still, communication is impossible without a shared understanding of the data sent between the two devices.
Modbus TCP and ProfiNet are two very different protocols. What they have in common is that they use the same hardware but after that they differ.
The Modbus TCP stack is very small and simple and is only good for transferring basic PLC types. The byte and word order is a problem for 32 bit values because it isn’t really defined in the specification. Manufacturers of equipment that Modbus TCP do what they please and sometimes this results in incompatibilities or 32 bit data must be re-arranged after receiving to be in the desired format.. We have seen this way too often. We checked our code by testing it with a Modicon PLC to make sure we could send and received 32 bit DINTs and REALs in the right order without having to shuffle bytes or words afterwards. Another problem with Modbus TCP is the TCP part. You want to use TCP to send data such as parameters that must be right. However, when sending basic I/O back and forth, TCP is a problem because if there is an error then TCP will force the re transmitting of old data. It would be best if there was a standard Modbus UDP because UDP wouldn’t force the re-tranmission of old I/O data.
ProfiNet is a big beast. The stack size is huge. The ProfiNet stack size is bigger than the Ethernet I/O, Omron Fins, Mitsubishi’s protocol and Modbus TCP combined. ProfiNet has a lof of code that is run early on that will make define connections or packets. ProfiNet allows for the I/O data to be transferred back and forth very efficiently. It is just too bad that the start up code is so big. It is good thing that memory is cheap. ProfiNet is a HUGE improvement over Siemens’ previous Ethernet protocols.
ProfiNet devices must be certified to claim ProfiNet compatibility. This is a big deal for the customer and the vendor. Obviously the cost of the testing is eventually past on to the end user but it also means there are no problems with the byte ordering that occurs with Modbus TCP.
We have implemented many Industrial Ethernet protocols on our product so we are quite aware of the development time, the amount of resources, difficulty to implement and support that each protocol requires.
Modbus/TCP was the 1st industrial Ethernet protocol, its basically Modbus on Ethernet. PROFINET is at least two generations of functionality improvement over Modbus; 1st generation being PROFIBUS. The 1st question that was asked in creating PROFIBUS was “how do we make this better than Modbus”, vastly that is diagnostics. Diagnostics to reduce downtime thus improving productivity.