
It is my understanding that the max number of registers that you can read over Modbus TCP is 123 and the setting defaults to 125
The limit would be the ReadHoldingRegistersResponse, and 125 registers fits just fine.
FC - 1 byte
Byte Count - 1 byte
Data - 250 bytes
The length indicated in the MBAP header would be 253 because it includes the 1 byte unit id that follows it.
The Modbus ADU limit of 256 only applies to Modbus RTU. Modbus TCP has a separate specification. The pictured reference document is simply wrong.
It's from Wikipedia. The author drew an incorrect conclusion out of thin air
Ok. Thanks everyone for their input. Now I just need to update the Wikipedia entry in this. Hopefully anyone who has this question again will see this post
I'm not sure what you're highlighting here. Do the math that I already laid out for you - a request for 125 registers fits.
Or is this reference for some future traveler?
You underlined the PDU. That is the same in both MB Serial and MBTCP. The request or response has to fit in 253 bytes, regardless which type of frame it travels in.
future traveler
Well Im the future traveler Schneider M580 plc with modbus tcp connection would not accept 125 max holding registers when writing consecutive addresses. We are using system.opc.writeValues
Just had a good 2.5 hours of discussion with ignition support and it simply would not work with anything higher than 123.
Non consecutive writing works as long as you dont have more than 123.
The max for writes actually is 123, not 125. The driver may use the setting for both, which I wouldn’t argue against being a bug.