Reference

Last revision 2025/12/26

The article provides an overview of RS485 and ModBus communication protocols, detailing RS485's resistance to noise interference and long-distance transmission capabilities, and explaining ModBus's master/slave architecture and its variants like RTU, ASCII, and TCP/IP.

Introduction to RS485 Communication Protocol

One of the typical serial communication standards.

The RS485 interface has the advantages of good resistance to noise interference, long transmission distance, multi-station capability and simple wiring, so it is widely used in industry.

The RS485 communication protocol only defines the transmission voltage, impedance and other electrical characteristics, but does not define the software protocol. The data signal adopts the finite difference transmission mode, so it has the ability to suppress common mode interference. The bus transceiver has high sensitivity, it can detect voltages down to 200mV. RS-485 is very convenient when used for multi-point interconnection, it can save a lot of signal lines. It uses a pair of twisted pairs, one of the conductors is defined as A and the other is defined as B. Normally, the positive level between the transmitting driver A and B is +2 ~ +6V, which is in the logic 1 state, and the negative level is between -2V ~ 6V, which is in the logic 0 state. The maximum transmission distance is about 1200 meters, the transmission rate is depending on the transmission distance. The shorter the distance rate, the faster the transmission speed. RS485 requires 2 terminal resistors, and its resistance value must be equal to the characteristic impedance of the transmission cable (usually 120Ω). In short-distance transmission, there is no need for terminal resistors. The terminal resistor is connected to both ends of the transmission bus.

Introduction to ModBus communication protocol

The Modbus protocol is a master/slave architecture protocol. Only one node of all nodes is the master node, and the other nodes that use Modbus protocol to participate in communication are slave nodes. Each slave device has a unique address. A ModBus command contains the Modbus address of the device which to be executed. All devices will receive the command, but only the device at the specified location will execute and respond to the command (except for address 0, the command at address 0 is a broadcast command, and all devices that receive the command will run, but will not respond to the command). All Modbus commands include a check code to ensure that the command arrived has not been corrupted. Basic Modbus commands can instruct an RTU to change a value in one of its registers, control or read an I/O port, and command the device to send back data in one or more of its registers.

There are many variants of the Modbus protocol:

  • Modbus RTU - Used in serial communication and uses compact binary representation of data for protocol communication. The RTU format follows the command/data, and has a cyclic redundancy check checksum as an error check mechanism to ensure the reliability of the data. Modbus RTU is the most common implementation available for Modbus. Modbus RTU messages must be sent continuously, and there is no hesitation between characters. Modbus messages are framed (separated) according to idle (silent) time periods.

  • Modbus ASCII - Used in serial communication, and uses ASCII characters for protocol communication. The ASCII format uses a longitudinal redundancy checksum. Modbus ASCII message consists of colon (":") and line feed character(CR / LF).

  • Modbus TCP/IP or Modbus TCP - This is a Modbus variant, it is used for communication on TCP/IP network which is connected by port 502. It doesn't need checksum calculation, because the lower layer already provides checksum protection.

Was this article helpful?

TOP