Skip to Main Content
Cognex Support Hub
LogoLogo

Modbus Communication Basics

This article describes the fundamentals of the Modbus industrial communication protocol.

03/30/2025

Details

Modbus was developed in 1979 as a serial communication protocol for industrial automation systems. It's widely used in SCADA and industrial automation for real-time monitoring and control. It allows communication between multiple devices connected to the same network, typically using a master-slave (client-server) architecture. The protocol supports various transmission modes, including Modbus RTU, Modbus ASCII, and Modbus TCP/IP.

  • Modbus RTU: uses binary encoding and CRC error checking, making it efficient for serial communication (RS-232, RS-485).
  • Modbus ASCII: uses ASCII characters with LRC error checking, but is less efficient than RTU.
  • Modbus TCP/IP: runs over Ethernet networks, encapsulating Modbus messages in TCP packets.


Modbus uses a structured addressing scheme to access data in connected devices. Each device on a Modbus network has a unique slave (server) address (in RTU/ASCII) or an IP address (in TCP/IP).

Within each device, data is stored in four primary address types:

  • Coils:  Discrete Outputs, Read/Write, 1-bit
  • Discrete Inputs: Read-Only, 1-bit
  • Holding Registers: Read/Write, 16-bit
  • Input Registers: Read-Only, 16-bit


Modbus operates using function codes to read or write data to registers or coils. Commonly used function codes include:

01, 02 – Read Coils/Discrete Inputs

03, 04 – Read Holding/Input Registers

05, 06 – Write Single Coil/Register

15, 16 – Write Multiple Coils/Registers

Related Resources

Loading component...