SEARCH

— 葡萄酒 | 威士忌 | 白兰地 | 啤酒 —

What is the relationship between RS-485 and Modbus? A Comprehensive Guide to RS-485 Communication

BLOG 670

Today, we’ll delve into the relationship between RS-485 and Modbus to help you better understand the connection between these two components.
The Open Systems Interconnection (OSI) model attempts to represent the various layers of a communication system, from the ultimate application to the electrical layer, and finally to the physical layer. The model consists of seven layers in total.

 

RS-485&Modbus

RS-485&Modbus

The physical layer (layer 1) of the OSI model is responsible for transmitting raw data between devices and the physical transmission medium. It handles the conversion of telecommunication signals to digital data and defines voltage levels, timing, data rates, and more.
At the data link layer (layer 2), RS-485 typically uses UART for serial communication, where the host UART drives and receives serial communication in a full-duplex mode. It connects to the RS-485 differential transceiver, which forms the physical layer, and converts the signals into a half-duplex differential format suitable for use on the RS-485 bus. The host then communicates with the RS-485 through the UART and instructs the transceiver when to switch between transmitting and receiving. The slave devices will also use their UARTs in a similar manner.
The network layer (layer 3) handles the actual communication between devices on the RS-485 bus. There is no fixed network layer addressing standard, but the RS-485 bus must be correctly managed by the master station to avoid bus conflicts. Therefore, each device on the bus must have a unique address. When the master device calls a specific address on the bus, the slave devices will compare the called address with their own addresses. If the addresses match, the slave device will respond to the master.
Since the RS-485 standard only defines the physical and data link layers with addressing requirements, the application layer can use various proprietary or open communication protocols. Engineers can adopt existing protocols like Modbus or define their own protocols for their applications.
Regarding RS-485 and Modbus, they operate at different layers of the OSI model. RS-485 refers to the physical serial port at the communication physical layer, while Modbus is a communication protocol used for data transmission based on the physical serial port.
Similar to the RS-485 physical serial port, there are RS-232 and RS-422, and data transmission can occur over these physical serial ports using the Modbus protocol.
The Modbus protocol can be further divided into Modbus RTU, Modbus ASCII, and Modbus TCP. Modbus RTU and Modbus ASCII are used on serial interfaces (RS-485, RS-232, RS-422), while Modbus TCP is used on Ethernet interfaces.
To draw an analogy, RS-485 is the highway connecting cities A and B, and the Modbus protocol is the vehicle running on that highway. The difference between Modbus RTU and Modbus ASCII is whether a compact car or a truck is running on the highway.

The prev: The next:

Related recommendations

Expand more!

Mo