<?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[A Bit Stuck on Writing Multiple MODBUS Registers]]></title><description><![CDATA[<p dir="auto">Hey Guys, long time no post haha. I've got a tricky one here...</p>
<p dir="auto">I have a MODBUS device I need to write two things simultaneously to to get the required function to work.<br />
I have to write a function code of 2 to register 4104 and key of 35702 to 4105 simultaneously.</p>
<p dir="auto"><img src="https://camo.nodebb.org/4ef1be8081fc7f85eff7b75a496cecebb8080bbb?url=https%3A%2F%2Fi.imgur.com%2FDPEpevn.png" alt="0_1595277160168_9bbef587-98b6-4caa-bfa7-2f0ba991255c-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I've tried putting the data in as hex or just decimal versions, on a 4 byte / 2 byte. Hair is being pulled out now and I don't have much left :P</p>
<p dir="auto">I've tried the fixed length option also as it allows you to select number of registers, but I can't work out how to separate the two values.</p>
<p dir="auto">This has to be something simple but I'm a bit lost with the syntax. Any help would be most appreciated. I'm a bit confused on this one.</p>
<p dir="auto">Cheers<br />
Dan</p>
]]></description><link>https://forum.mango-os.com/topic/4880/a-bit-stuck-on-writing-multiple-modbus-registers</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 09:11:29 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4880.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jul 2020 20:13:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 13:13:49 GMT]]></title><description><![CDATA[<p dir="auto">exactly</p>
]]></description><link>https://forum.mango-os.com/post/25546</link><guid isPermaLink="true">https://forum.mango-os.com/post/25546</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Wed, 22 Jul 2020 13:13:49 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 11:29:54 GMT]]></title><description><![CDATA[<p dir="auto">I tried a little bit of script magic to see if it would do it at the same time, but I think still not quick enough..<br />
<img src="https://camo.nodebb.org/52ed9e99aaf2488a789e6eada8b02dc777504555?url=https%3A%2F%2Fi.imgur.com%2FMzNTRzR.png" alt="0_1595418651817_c2b6021c-e189-4a1e-8117-28a42226f4b1-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="https://camo.nodebb.org/d4d86fdde1f26157f57d46d6c6d1fa69f6d74eba?url=https%3A%2F%2Fi.imgur.com%2FWMtLEE6.png" alt="0_1595418680470_2482c105-ebe7-4717-bdf9-643997d448b8-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I guess I need to combine the two 16 bit values into one 32 bit value, then write that to the single register, which should extend to the second yeh?</p>
]]></description><link>https://forum.mango-os.com/post/25545</link><guid isPermaLink="true">https://forum.mango-os.com/post/25545</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 11:29:54 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 10:54:31 GMT]]></title><description><![CDATA[<p dir="auto">You should capture the command with Wireshark and see if it matches what you are expecting.</p>
]]></description><link>https://forum.mango-os.com/post/25544</link><guid isPermaLink="true">https://forum.mango-os.com/post/25544</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Wed, 22 Jul 2020 10:54:31 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 10:53:26 GMT]]></title><description><![CDATA[<p dir="auto">ok sweet as, thanks for that I'll give it a go</p>
]]></description><link>https://forum.mango-os.com/post/25543</link><guid isPermaLink="true">https://forum.mango-os.com/post/25543</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 10:53:26 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 10:52:40 GMT]]></title><description><![CDATA[<p dir="auto">I may be wrong here but I am pretty sure that the only way that mango will write them in the same command is if you use 1 x  4-byte data point.</p>
]]></description><link>https://forum.mango-os.com/post/25542</link><guid isPermaLink="true">https://forum.mango-os.com/post/25542</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Wed, 22 Jul 2020 10:52:40 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 10:47:08 GMT]]></title><description><![CDATA[<p dir="auto">So I emailed DSE from their website contact form for shits and giggles, not really expecting to hear back... A nice fella from the UK emailed back almost immediately with all the official docs on the thing. I thought that was awesome.. Anyway, here's a more explanatory version of what I had found originally...</p>
<p dir="auto"><img src="https://camo.nodebb.org/9e4bb1ea46c769295ef67952d6a6b5f51645d4ff?url=https%3A%2F%2Fi.imgur.com%2FlLuv9Er.png" alt="0_1595416069873_69719d29-dae3-4c8b-adb2-d135b9f6d889-image.png" class=" img-fluid img-markdown" /><br />
<img src="https://camo.nodebb.org/a97c556acde544024cdbbc692980dddc1debf139?url=https%3A%2F%2Fi.imgur.com%2FiXBt4eP.png" alt="0_1595416123361_de62073f-3f72-412c-a056-53c21c664afa-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">So looking at that, I should be sending 35702 to 4104 and 29833 to 4105<br />
:)<br />
I'll give that a go..</p>
]]></description><link>https://forum.mango-os.com/post/25541</link><guid isPermaLink="true">https://forum.mango-os.com/post/25541</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 10:47:08 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:21:53 GMT]]></title><description><![CDATA[<p dir="auto">OK, thanks Craig. I have a data point I made earlier which I will go back to and see what it does.<br />
Thanks</p>
]]></description><link>https://forum.mango-os.com/post/25540</link><guid isPermaLink="true">https://forum.mango-os.com/post/25540</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:21:53 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:19:36 GMT]]></title><description><![CDATA[<p dir="auto">If I was troubleshooting I would create data points instead of using the modbus tool.  It looks like you are using quite an old version of mango and I have had issues with the modbus tool in older versions.  I think it would be worth cancelling that out of the troubleshooting.</p>
]]></description><link>https://forum.mango-os.com/post/25539</link><guid isPermaLink="true">https://forum.mango-os.com/post/25539</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:19:36 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:16:18 GMT]]></title><description><![CDATA[<p dir="auto">Yeh the Mango instance is a few hundred ms away. It seems to work fine reading in voltages and RPM's and the like. Just been playing up a little today probably due to the weather.<br />
Even when it was working fine the write function still didn't seem to be the correct syntax.</p>
]]></description><link>https://forum.mango-os.com/post/25538</link><guid isPermaLink="true">https://forum.mango-os.com/post/25538</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:16:18 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:14:34 GMT]]></title><description><![CDATA[<p dir="auto">Seems like perfect troubleshooting conditions :)<br />
ye so basically no response from the command.  Only thing I can suggest is checking if the actual number is causing the "no response" by sending a different digit.  is the modbus request going over the network or do you have a local mango instance there ?</p>
]]></description><link>https://forum.mango-os.com/post/25537</link><guid isPermaLink="true">https://forum.mango-os.com/post/25537</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:14:34 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:13:50 GMT]]></title><description><![CDATA[<p dir="auto">With a bloody big hammer.</p>
]]></description><link>https://forum.mango-os.com/post/25536</link><guid isPermaLink="true">https://forum.mango-os.com/post/25536</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:13:50 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:13:32 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">although might actually currently be a timeout in the network, as it's on the top of a mountain in NZ. at the end of a Mimomax link :/<br />
I do believe it's snowing up there currently..</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> Sounds like I need to make a roadtrip! Haha</p>
]]></description><link>https://forum.mango-os.com/post/25535</link><guid isPermaLink="true">https://forum.mango-os.com/post/25535</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:13:32 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 07:08:10 GMT]]></title><description><![CDATA[<p dir="auto">Bugga, still same timeout message when network is responding better.</p>
<p dir="auto">com.serotonin.modbus4j.exception.ModbusTransportException: java.net.SocketTimeoutException: connect timed out</p>
<p dir="auto">If I interrogate a standard read point it works fine.</p>
]]></description><link>https://forum.mango-os.com/post/25534</link><guid isPermaLink="true">https://forum.mango-os.com/post/25534</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 07:08:10 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 06:57:06 GMT]]></title><description><![CDATA[<p dir="auto">although might actually currently be a timeout in the network, as it's on the top of a mountain in NZ. at the end of a Mimomax link :/<br />
I do believe it's snowing up there currently..</p>
]]></description><link>https://forum.mango-os.com/post/25533</link><guid isPermaLink="true">https://forum.mango-os.com/post/25533</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 06:57:06 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 06:55:03 GMT]]></title><description><![CDATA[<p dir="auto">Interestingly I get a timeout message if I try writing the whole decimal number to either data point register.<br />
<img src="https://camo.nodebb.org/25139d8c4a85a2c225f1cc91e73aa257bfb6f96c?url=https%3A%2F%2Fi.imgur.com%2FFua7edM.png" alt="0_1595402220586_b29f9048-0451-42d0-9ba5-23975e820734-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">If I change back to a hex value it just comes up with the top blue error again.</p>
]]></description><link>https://forum.mango-os.com/post/25532</link><guid isPermaLink="true">https://forum.mango-os.com/post/25532</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 06:55:03 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 06:46:25 GMT]]></title><description><![CDATA[<p dir="auto">Hey Guys, thanks again for helping out. That's a big number. I'll give that one a go, I'll try it into 4104 and 4103.</p>
<p dir="auto">Cheers<br />
Dan</p>
]]></description><link>https://forum.mango-os.com/post/25531</link><guid isPermaLink="true">https://forum.mango-os.com/post/25531</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Wed, 22 Jul 2020 06:46:25 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 06:43:50 GMT]]></title><description><![CDATA[<p dir="auto">I think your answer is right here craig, something is amiss with how I did it, but looking at it now, I think we're all starting to break the back of it.</p>
]]></description><link>https://forum.mango-os.com/post/25530</link><guid isPermaLink="true">https://forum.mango-os.com/post/25530</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Wed, 22 Jul 2020 06:43:50 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 06:23:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi Dan</p>
<p dir="auto">Regarding the address, I think you are correct.  Well since other address work you are correct.  If 4104 is not working I would try 4103.</p>
<p dir="auto">I think <a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a> is correct regarding the ones's compliment that needs to be written to address 9.  I get a different number tho.<br />
<img src="https://camo.nodebb.org/858e4355303a116f764ca7b7ffafc2223f9ddcce?url=https%3A%2F%2Fi.imgur.com%2FKkDRxzW.png" alt="0_1595400358409_Screenshot 2020-07-22 at 08.45.17.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/25529</link><guid isPermaLink="true">https://forum.mango-os.com/post/25529</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Wed, 22 Jul 2020 06:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 02:55:01 GMT]]></title><description><![CDATA[<p dir="auto">It's greyed out and disabled.</p>
]]></description><link>https://forum.mango-os.com/post/25528</link><guid isPermaLink="true">https://forum.mango-os.com/post/25528</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Wed, 22 Jul 2020 02:55:01 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Wed, 22 Jul 2020 02:53:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a><br />
just curious why the 'Number of registers' is '0'? shouldn't be at least '1'?</p>
]]></description><link>https://forum.mango-os.com/post/25527</link><guid isPermaLink="true">https://forum.mango-os.com/post/25527</guid><dc:creator><![CDATA[cwangv]]></dc:creator><pubDate>Wed, 22 Jul 2020 02:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Tue, 21 Jul 2020 21:31:30 GMT]]></title><description><![CDATA[<p dir="auto">Interestingly, when I write the hex values I get this pop up error..<br />
<img src="https://camo.nodebb.org/7457e92e69b48dab58e8b5eadccccfae799b9bbd?url=https%3A%2F%2Fi.imgur.com%2FSnJv0eD.png" alt="0_1595368403070_8b8aefed-818b-4048-850e-4e56afa9c2a3-image.png" class=" img-fluid img-markdown" /><br />
Nothing written in the log during this time however :/<br />
<img src="https://camo.nodebb.org/a6681d9ba77d8361273fbc6e682e6563df4be85a?url=https%3A%2F%2Fi.imgur.com%2FQXgPzC8.png" alt="0_1595368421016_04c99fc6-f9b1-47b1-9109-ffaa4b0fe395-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/25526</link><guid isPermaLink="true">https://forum.mango-os.com/post/25526</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 21 Jul 2020 21:31:30 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Tue, 21 Jul 2020 21:28:49 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://camo.nodebb.org/df888d71e98106e87f4d0f4bfd19bdd3e73da3e6?url=https%3A%2F%2Fi.imgur.com%2FnCfOCbo.png" alt="0_1595368234133_6f692b3b-5b32-4e53-8adc-08c5a7ab46a9-image.png" class=" img-fluid img-markdown" /><br />
<img src="https://camo.nodebb.org/f93ca041fda4d3c0cacba9194160c9197cfa2e33?url=https%3A%2F%2Fi.imgur.com%2Fsa40ddi.png" alt="0_1595368250040_9530b480-46fd-4685-869a-41c8aebbf8c0-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.mango-os.com/post/25525</link><guid isPermaLink="true">https://forum.mango-os.com/post/25525</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 21 Jul 2020 21:28:49 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Tue, 21 Jul 2020 20:58:25 GMT]]></title><description><![CDATA[<p dir="auto">OK, now my brain is really hurting, I'll turn on the i/o log and see what mine is outputting.<br />
Just to clarify a little further, the MODBUS register I need to write to is on 'Page 16', the manual says to multiply 256 x Page then add the Offset, so in this case I'm on (256 x 16) + 8 = 4104<br />
When reading off battery voltages and other engine diagnostics off this the formula seems to work.<br />
I'll try again with the decimal.</p>
<p dir="auto">Cheers</p>
]]></description><link>https://forum.mango-os.com/post/25524</link><guid isPermaLink="true">https://forum.mango-os.com/post/25524</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 21 Jul 2020 20:58:25 GMT</pubDate></item><item><title><![CDATA[Reply to A Bit Stuck on Writing Multiple MODBUS Registers on Tue, 21 Jul 2020 20:21:47 GMT]]></title><description><![CDATA[<p dir="auto">Ok, so I can understand using 166774 gives you 0x00028b76, basically just bit shifts the entire thing in. And that by using a holding register implicitly puts a 4 in the front so only 104 is needed... But if the manual states you need a control key into 8 and its 1's complement into register 9, shouldn't it be 0x8B768B76 = 2339801974 DEC?</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/25523</link><guid isPermaLink="true">https://forum.mango-os.com/post/25523</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Tue, 21 Jul 2020 20:21:47 GMT</pubDate></item></channel></rss>