Modbus "Read Multiple Registers" Max Length?

jonnies

Member
Join Date
Jun 2009
Location
Illinois
Posts
26
Hi all,

I am writing a program where the user will input a bunch of individual registers they want to read. I am going to sort these registers and bunch them into an array of Read Multiple Register Commands based on how close the addresses are to each other. For instance, if they say they want to read 4x0001, 2, 3, 778, and 779, I will do 2 Multiple Reads, one for the low addresses and one for the high.

My question is, is there a practical maximum for the length a Multiple Read can handle? Say they enter in 4x0001, 2, 3 all the way up to 100. Will there be a problem if my program tries to execute a Multiple Read with length 100? Or does it depend on the hardware?

The master is in Modbus TCP/IP and the slave is in Modbus RTU (RS232), so I am limited to the worst cases of both protocols. And I am using a B&B Gateway to convert back and forth, which may provide additional limitations.

Does anyone have any experience or insight into this?

Thanks!

Jon
 
Hello,

The MODBUS protocol limits the message reply frame to 255 bytes. One byte is the count. 5 bytes for overhead and 250 for data. That is 2000 coils/inputs or 125 holding/input registers.

As a note, not all devices support all address register. Some devices will put data in non-contiguous registers. Attempting to read across those unassigned address will generate an error response.


Good luck,

Mark
http://www.peakhmi.com/
 
Last edited:
I have run across slaves that do not support more than 16 words for read/write multiple commands. I am sure that other devices may have other limitations. You may have to use a little trial and error to see what limitations your devices have.
 

Similar Topics

Dear Experts, Can you help me, I am using compactlogix cpu with ILX34-MBS485 card as Rs485 master in serial modbus network to make communication...
Replies
5
Views
2,793
Hi! Can anyone help me with ModBus TCP Read Multiple Registers(Function Code 03)? I have a Master Request: 00 00 00 00 00 06 01 03 64 06 00 07...
Replies
2
Views
3,902
Hi everyone, I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system. SCADA <-...
Replies
4
Views
136
Hello, I set up my Micro820 with a basic mapping. When I try to run a script to read the addresses I get errors for illegal addresses...
Replies
2
Views
139
I have Micro850 with module 2080-Serialisol. It is needed to read 5 registers from a device via Modbus RTU. The device is Ok, I can read the data...
Replies
0
Views
1,133
Back
Top Bottom