The types of registers referenced in Modbus devices include the following: Field In case the requested function is not supported by the slave device or the arguments in the field of the request are incorrect for this server, in the FN field of the response the high bit will be set to 1 and the Data field will contain additional information on the error occurred.Īlso, particular slave devices can have specific registers with additional information. function arguments (N bytes, depending on the function),Īs you can see, the response and request frames have similar constructions, except for the Data field, which provides different content depending on the function performed. In RTU mode, messages start with a silent interval of at least 3.5 character times.Ī request message is sent in the following format: The request contains a sequence of bytes, called a frame, in which the time between bytes is standardized depending on the data transfer rate and is no longer than the interval during which 1.5 bytes of data can be transmitted. The master interacts with slave devices in the request-response format. There is always one master on the network and from 1 to 247 slaves. That means communication is always initiated by one device, the master, which sends a request to a slave (server) and waits for a response. Modbus protocol is implemented using a master-slave relationship. In this article, we'll talk about Modbus RTU transmission mode. In TCP/IP networks, however, the higher-level protocol is TCP transport protocol and this variant is called Modbus TCP.
The standard 'environment' for Modbus protocol is RS485/422/232. The typical structure of an automation system that uses Modbus as its basic protocol is shown below. The field level is the level of interaction between sensors and controllers or sensors and the server. The middle level is the level of controllers - devices that collect data and control the technological process. Modbus is a common protocol used in automation systems at the middle and lower (field) levels.
In this article, we'll cover the key features of the existing software and hardware solutions for testing and debugging devices and networks based on Modbus protocol. All this ensures the growth of Modbus popularity among amateurs and professionals. The development of such projects as Arduino and Raspberry Pi has significantly increased interest in tasks related to robotics and automation. The protocol serves for connecting equipment of various types to a home computer as well. Modbus is a communication protocol commonly used in industrial automation systems, smart home systems, automated networks of small objects (warehouses, greenhouses, etc).