3

I have two questions:

  1. Why does Modbus allow only 247 slaves to be connected to the same network?

  2. How it this limitation overcome by Modbus TCP/IP?

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
Prem Sanil
  • 128
  • 8
  • 2
    I imagine that since Modbus was originally used in hard-wired applications (RS485) that required slaves to be wired in series with one another, there was a physical limitation to the number of devices that could be connected. Here, an 8-bit address would be adequate. Once Modbus protocol extended to networks through TCP/IP, there would no longer be this physical limitation. My 2 cents... – Nanomurf Mar 21 '14 at 13:40
  • 1
    RS-485 can only reliably support a couple dozens of slaves on the same network, so even 247 is an overkill. The only way to implement a 247-node modbus network is to create a hierarcy where level 1 slaves act as masters and forward messages to level 2 slaves. – astreltsov May 31 '17 at 06:58

1 Answers1

7

1) The address field in the Modbus-defined frame is only 8 bits wide. This would provide for 256 possible slave addresses. Address 0 is reserved as a "broadcast" address.

I can't find a specific reason, but there are presumably eight other "reserved" addresses that are not valid for a slave. 256 - 9 = 247.

2) Modbus TCP/IP is implemented atop standard IPv4 addressing, which is limited only to the size of the local subnet (e.g. 10.10.0.0). Each "gateway" on the network will have its own IP address, so there can be many more than 247 gateways.

In addition, each gateway can have multiple Modbus devices behind it. The number of devices behind such a gateway is limited by the same 8-bit address field, here called the "Unit Identifier".

Reference:

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328