π§ What Is Modbus?
Modbus, developed by Modicon (now Schneider Electric), is a master-slave protocol. A master device sends requests, and the slave responds with data or executes the command. Modbus supports up to 247 slave devices on a network, using RS-485 (RTU) or Ethernet (TCP/IP) as physical layers.
π¦ Modbus Data Storage Structure
- Coils (00001β09999): 1-bit, Read/Write
- Discrete Inputs (10001β19999): 1-bit, Read-Only
- Input Registers (30001β39999): 16-bit, Read-Only
- Holding Registers (40001β49999): 16-bit, Read/Write
These registers can represent Boolean values, integers, or even be combined for 32-bit floating-point values.
π Endianness in Modbus
When reading 32-bit values (2 x 16-bit registers), order matters. Devices may use Little Endian (LSB first) or Big Endian (MSB first). If the master and slave use different formats, byte-swapping is required.
Example:
- Register 41056 = MSB
- Register 41057 = LSB
π Practical Tips
- Check device documentation for register offsets (0, 1, or -1).
- Understand signed vs unsigned values in Input and Holding registers.
- Use two registers for floating point or long integer values.
π Need Modbus-Compatible Products?
At CambiaPLC, we offer a large inventory of PLC and automation parts from trusted brands like Bently Nevada, ABB, Siemens, Honeywell, Schneider and more. Whether you're building a new system or upgrading existing equipment, we provide reliable, fast-shipping components to help you stay in control.
π Visit CambiaPLC.com for trusted industrial automation solutions.