Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP max registers..

I am using the NI Modbus Library 1.2.1.  I have successfully implemented it with another controller that doesn't have the 125 register limitation, but I am finding that my writing/reading the registers seems to force stop at 125.  Is this changeable in the library?   If not, what is the best work around?  Multiple reads? Multiple Servers (Slaves)?

0 Kudos
Message 1 of 4
(8,709 Views)

Hey wegunterjrNGC,

 

Unfortunately, the 125 limit is a hard limit of the protocol and to reference registers higher than this amount you will have to perform multiple reads, as you mentioned.

 

Regards,

 

Ryan

Ryan P.
CLA
0 Kudos
Message 2 of 4
(8,696 Views)

Okay.  That makes sense.   I will just have to read twice (ie, once for the first 125 using Read Holding Registers with a 1 starting constant and 125 read constant, and the second time starting at 126 starting constant and some number less than 251, right)?

 

0 Kudos
Message 3 of 4
(8,687 Views)

I believe you usually specify a start constant followed by the number of registers to read. So, it would be something like:

 

1. Start = 1, Read/Length = 125

2. Start = 126, Read/Length = 125

 

That should read registers 1-250. However, if your code is set up to set a start and end register then the way you described would work fine.

Ryan P.
CLA
0 Kudos
Message 4 of 4
(8,677 Views)