Testing the limits of the Modbus protocol

122 views
Skip to first unread message

Oyonika Samazder

unread,
May 5, 2022, 1:45:55 AM5/5/22
to modbus-tk
Hi hi!

I am attempting to test the limits of the Modbus protocol and I can see that I am able to create a maximum of 256 ModbusSlaveContexts within a store/server contexts. Is there a way to overcome this limit?

On the client end: client.write_registers(address, payload, skip_encode = True, unit = 256) throws an error because the write_registers API takes in a short unsigned int which can only handle values in the range [0, 255]. Can I create multiple server contexts or more slave contexts somehow?

Cheers,
Oyonika

alex chiosso

unread,
May 5, 2022, 6:10:28 AM5/5/22
to modb...@googlegroups.com
Hi Oyonika.

The Modbus protocol has its own rules and specifications, moreover it's a "Standard de Facto" so that you should respect the rules.
I'm assuming that you're referring to the Modbus RTU.
So if you exceed the 255 slaves you should have more than one Master.
I'm not a super expert but this is my "two cents'' advice. 

Regards

--
You received this message because you are subscribed to the Google Groups "modbus-tk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modbus-tk+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modbus-tk/1b020f25-0605-4fd8-a2be-51a05c68a956n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages