<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Optimizing semi-contiguous reads for modbus]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I've been reading some devices with mango via modbus IP over satellite.  Apart from the high latency we also have a bandwidth limit and ridiculous charges for data used beyond our limit.</p>
<p dir="auto">I've noticed that if the addresses being read are contiguous they get read all at once with the 'read multiple registers' modbus command whereas if they are not strictly contiguous a seperate read request is issued for each register or group of contiguous registers.</p>
<p dir="auto">Each read register request is about 50 bytes regardless of how many registers are read. Likewise there is an overhead of about 50 bytes per reply, regardless of how many registers are in the reply.</p>
<p dir="auto">It takes mango 3 seconds per request-response cycle with these satellites.  Cutting down the number of requests is going to allow us to increase the refresh rate and save on bandwidth charges on the satellite.</p>
<p dir="auto">Temporarily I could add points to make the addresses contiguous but then I have all the unused points cluttering &amp; confusing the instance.</p>
<p dir="auto">Is the source for the com.serotonin.modbus4j package available so I could take a crack at getting the number of modbus requests we're making down?</p>
<p dir="auto">Cheers<br />
Craig</p>
]]></description><link>https://forum.mango-os.com/topic/132/optimizing-semi-contiguous-reads-for-modbus</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 08:25:55 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/132.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Jan 2009 03:13:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Optimizing semi-contiguous reads for modbus on Thu, 05 Jul 2018 18:10:13 GMT]]></title><description><![CDATA[<p dir="auto">My first post was a link with no description, so it was censored.</p>
]]></description><link>https://forum.mango-os.com/post/19084</link><guid isPermaLink="true">https://forum.mango-os.com/post/19084</guid><dc:creator><![CDATA[nkurtalj]]></dc:creator><pubDate>Thu, 05 Jul 2018 18:10:13 GMT</pubDate></item><item><title><![CDATA[Reply to Optimizing semi-contiguous reads for modbus on Mon, 12 Jan 2009 21:03:41 GMT]]></title><description><![CDATA[<p dir="auto">BTW, check out the Mango source, specifically com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource at line 57. The line is this:</p>
<pre><code>batchRead.setContiguousRequests(true);
</code></pre>
<p dir="auto">Maybe try setting that to false and see what happens.</p>
]]></description><link>https://forum.mango-os.com/post/2408</link><guid isPermaLink="true">https://forum.mango-os.com/post/2408</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 12 Jan 2009 21:03:41 GMT</pubDate></item><item><title><![CDATA[Reply to Optimizing semi-contiguous reads for modbus on Mon, 12 Jan 2009 20:57:42 GMT]]></title><description><![CDATA[<p dir="auto">You should be able to somehow access the CVS repository. This would be more convenient should you have changes to submit. But if you have trouble getting to it let me know.</p>
]]></description><link>https://forum.mango-os.com/post/2407</link><guid isPermaLink="true">https://forum.mango-os.com/post/2407</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 12 Jan 2009 20:57:42 GMT</pubDate></item><item><title><![CDATA[Reply to Optimizing semi-contiguous reads for modbus on Sat, 10 Jan 2009 04:13:40 GMT]]></title><description><![CDATA[<p dir="auto">Hi Matt,<br />
There is only 1 zip file I can find to download on the sourceforge modbus4j website and it only has .class files in it and not .java files.</p>
<p dir="auto">I suppose knowing that BatchRead makes separate requests if there are non contiguous addresses I could insert the missing addresses in at the top of ModbusDataSource.doPoll() to get BatchRead to read bigger batches.</p>
<p dir="auto">Cheers<br />
Craig</p>
]]></description><link>https://forum.mango-os.com/post/2404</link><guid isPermaLink="true">https://forum.mango-os.com/post/2404</guid><dc:creator><![CDATA[craig]]></dc:creator><pubDate>Sat, 10 Jan 2009 04:13:40 GMT</pubDate></item><item><title><![CDATA[Reply to Optimizing semi-contiguous reads for modbus on Sat, 10 Jan 2009 03:49:57 GMT]]></title><description><![CDATA[<p dir="auto">Yes. Go here: <a href="http://sourceforge.net/projects/modbus4j/" rel="nofollow ugc">http://sourceforge.net/projects/modbus4j/</a></p>
]]></description><link>https://forum.mango-os.com/post/2403</link><guid isPermaLink="true">https://forum.mango-os.com/post/2403</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Sat, 10 Jan 2009 03:49:57 GMT</pubDate></item></channel></rss>