Mobus slave Address

U

Thread Starter

UY

hi everybody,

I am learning about modbus. I know that modbus use 8 bit for address slave. But I do not understand why the maximum number of modbus slave is 247, not is 256 (0 is used for broadcast). The address from 248 to 255 is used for which purpose?

Can you please answer this question for me?

thank you very much.
 
I don't know what 248 to 255 are used for. They're not used because that's what the Modbus spec says.

Modbus Over Serial Line V1.02", page 8, Section 2.2 Modbus Addressing rules, "from 248 to 255: Reserved".
 
L

Lynn August Linse

Most slave and master devices support all addresses from 1 to 255, in part because many were created long before the present limitation was imposed.

I have seen some small Modbus devices which 'default' to slave address 254 or 255, so if your master can't handle 254 or 255, you'd be out of luck & couldn't use Modbus to change the slave id.

Also the Modbus/TCP section suggests unit id 255 be used for a 'bridge device' internally - so for example a TCP to RTU bridge might have RS-485 slaves 1 to 20 on the serial port. So the bridge will forward unit id 1-20 to the serial port, perhaps reject address 21-254 with exception 0x0A (no path), and 255 could be used to read/write the bridge settings.

So I'd suggest for new work you be aware of the standard's limitations (for example: avoid defaulting to 254), but you'll shot yourself in the foot (marketing-wise) if you cannot handle all addresses from 1-255.
 
Top