Modbus TCP - Basic Knowledge
The Modbus protocol, developed in 1979, serves as a communication protocol based on master/slave architecture.For industrial communication via Ethernet, Modbus TCP has established itself alongside EtherCAT, EtherNet/IP, Profinet IO and Powerlink as a de-facto standard. The basis is formed by the available basic technologies, a multitude of industrial serial devices, and a stable specification.
So far, there is no uniform application protocol for industrial Ethernet. There will probably not be one for the foreseeable future. IAONA is making efforts to start the planning, but so far, specific results from the participating industrial associations only exist in the field of installation directives. The solutions known until now can be subdivided into the categories of ‘systems for distributed automation’ and ‘fieldbus-on-Ethernet solutions”.
Up until now Profinet CBA and IDA belong to the systems for distributed automation. These two concepts cover a complete system. With this, an automation task is solved through the cooperation of intelligent, distributed devices. The systems require a completely new procedure for programming and engineering.
On the other hand, fieldbus solutions are characterized by the mostly unchanged fieldbus protocol. With this, Ethernet TCP/IP was approved as a new transmission technology.
EtherNet/IP (Rockwell Automation, ODVA), Profinet IO (Siemens, PNO), EtherCAT (Beckhoff, ETG), and Modbus TCP (Schneider Automation, IDA) are typical representatives of this category. The advantages of these systems are that their use does not require a basic rethinking by the user and that the specifications are stable. These solutions are intended for the fast, reliable transmission of data between field devices and automation devices.
The Modbus solution
The TCP solution provided that Ethernet TCP/IP would be admitted as a further transmission technology for the Modbus protocol, which was already approved in the year 1979. The solution was provided by Schneider Automation into the IETF (Internet Engineering Task Force) organization, which is responsible for Internet standardization. The Modbus services and the object model of the source variant were kept unchanged. With this, they were mapped on TCP/IP as transmission media. In this way Modbus was expanded, and as such, is composed of the classical Modbus-RTU (asynchronous transmission via RS-485 or RS-232), the Modbus TCP (client-server communication based on Ethernet TCP/IP) and the Modbus-Plus (high-speed communication via a token-passing network). The uniform application protocol is common for all variants.
The application protocol is independent of the transmission medium that is used. The organization follows the client-server principle. The client initializes a service call by sending a request telegram. This call then is answered by the server with a response telegram. The request telegram (as well as the response telegram) contains parameters or data.
With the Modbus standard communication, a CRC checksum and the slave address are transmitted in addition to the data and the command code. With Modbus TCP, these functions are performed by the subordinate TCP protocol.
TCP/IP – Mapping
The Modbus TCP Modbus application protocol uses the “transport control protocol” (TCP) for data transmission in Ethernet TCP/IP networks. The parameters and data are embedded into the payload container of a TCP telegram in accordance with the encapsulation principle. With the embedding, a Modbus application header (MBAP) is generated by the client. This offers the unambiguous interpretation of the received Modbus parameters and commands.
The performance of a Modbus TCP network depends on the performance of the processors in the communication interface of the participating devices as well as the type / execution of the respective Ethernet network. At approximately 60 %, the efficiency of the Modbus TCP protocol is relatively high. In an ideal case, approximately 3.6 million 16-bit register values per second can be transmitted in a 100 Mbps switched Ethernet network. However, in practical applications, this value is not reached by far. The actual transmission times in the network and especially the protocol processing times in the interfaces of the field devices cannot be neglected. These represent the factors determining the performance. Tests with a Momentum-SPS have shown that approximately 4,000 decentralized I/O devices (with 16 analog measurement values and 32 digital I/Os) can be served per second.
As a standard variant for the industrial Ethernet application protocol, Modbus TCP is available in nearly all new devices with an integrated Ethernet TCP/IP connection. Many different standard SPS are available as clients with an additional communication processor, as well as PC cards and an OPC server.
Certified devices are flagged in the Modbus product catalogue. They offer the users the advantage of being able to recognize possible communication problems in advance of industrial use and to correct them during the test procedure.
Their use is required if the advantages of the Ethernet transmission technology - e.g. a high number of subscribers, long range and the additional use of IT functions (file transfer, e-mail transmission, and Web technology) - via the same medium can justify the additional costs of the required network infrastructure (star-shaped wiring with intelligent switches). Modbus has a considerable time lead over other industrial Ethernet concepts. There is a lower entry threshold with regard to the required know-how and the initial costs. This applies to device manufacturers and users as well.