Modbus


Simple and Smart

 


 


Introductionmodbus

Modbus is a serial communications protocol published by Modicon in 1979 for use with its programmable logic controllers (PLCs). It has become a de facto standard communications protocol in industry, and is now the most commonly available means of connecting industrial electronic devices.

The main reasons for the extensive use of Modbus over other communications protocols are:

  • It is openly published and royalty-free
  • It can be implemented in days, not months
  • It moves raw bits or words without placing many restrictions on vendors

 



Variations of Modbus

Two variants exist, with different representations of numerical data and slightly different protocol details. Modbus RTU is a compact, binary representation of the data. Modbus ASCII is human readable, and more verbose.

Both of these variants use serial communication. The RTU format follows the commands/data with a cyclic redundancy check checksum, while the ASCII format uses a longitudinal redundancy check checksum. Nodes configured for the RTU variant will not communicate with nodes set for ASCII, and the reverse. Modbus/TCP is very similar to Modbus RTU, but transmits the protocol packets within TCP/IP data packets.

 



Communication

Each device intended to communicate using Modbus is given a unique address. Any device can send out a Modbus command, although usually only one master device does so. A Modbus command contains the Modbus address of the device it is intended for. Only the intended device will act on the command, even though other devices might receive it. All Modbus commands contain checking information, ensuring that a command arrives undamaged. The basic Modbus commands can instruct an RTU to change a value in one of its registers, as well as commanding the device to send back one or more values contained in its registers.

To learn more about the Modbus protocol we recommend the following articles:

Modbus FAQ
Modbus Protocol Reference Guide

Modbus on Wikipedia