I am using the Modbus Serial Master v1.0 8-14-2006 sample code provided by Opto 22 to interface with a Siemens GC. I can successfully read 125 consecutive holding registers but when I try to increase the number above 125 I get errors and no data is received. Any ideas?
As you have probably found, you frequently need to read registers at non-consecutive addresses. You just need to make multiple requests with a different start register and then copy the results out of your Modbus holding registers into a new variable/table each time. The same goes for reads with more than 125 registers.
See the attached image for the pattern I typically use when reading from non-contiguous addresses.