<?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[Problem with reading 8 byte unsigned modbus data]]></title><description><![CDATA[<p dir="auto">I am reading an 8 byte modbus parameters and it seems to be returning the least significant byte as a zero. Has anyone else had this issue?</p>
]]></description><link>https://forum.mango-os.com/topic/3021/problem-with-reading-8-byte-unsigned-modbus-data</link><generator>RSS for Node</generator><lastBuildDate>Fri, 08 May 2026 11:27:16 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3021.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Oct 2017 14:34:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with reading 8 byte unsigned modbus data on Mon, 23 Oct 2017 17:38:30 GMT]]></title><description><![CDATA[<p dir="auto">Hmm. Well, I'll think about it more but I'm fairly confident Modbus4J handles it properly.</p>
<p dir="auto">Yeah you should be able to unpack the string the same way you packed it.</p>
<p dir="auto">Edit: My recommendation, to prove what you're saying, would be to disable all the points on your modbus data source, the enable IO logging and the two points as 4 byte variants. Do the read, disable the points. Enable the 8 byte single point, do a read. Post the resultant IO log.</p>
]]></description><link>https://forum.mango-os.com/post/15908</link><guid isPermaLink="true">https://forum.mango-os.com/post/15908</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 23 Oct 2017 17:38:30 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with reading 8 byte unsigned modbus data on Mon, 23 Oct 2017 17:18:41 GMT]]></title><description><![CDATA[<p dir="auto">If I simply read the registers from the device, I get back what I expect. If I split the read into two 4 byte unsigned reads, then the data is correct in each part. I actually wrote the device code and am sure it works as intended.<br />
One more question: Is it possible to access the actual array of bytes read from the device if the point data is set to a fixed length string?<br />
This would really simplify my script processing of special data types.</p>
<p dir="auto">Thanks!</p>
<p dir="auto">Malcolm</p>
]]></description><link>https://forum.mango-os.com/post/15907</link><guid isPermaLink="true">https://forum.mango-os.com/post/15907</guid><dc:creator><![CDATA[malcolmbco]]></dc:creator><pubDate>Mon, 23 Oct 2017 17:18:41 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with reading 8 byte unsigned modbus data on Mon, 23 Oct 2017 16:04:06 GMT]]></title><description><![CDATA[<p dir="auto">It's only zero'ing a byte, not a register? Here's the code that would be doing the transformation from the byte array over the wire to a number for the consumer: <a href="https://github.com/infiniteautomation/modbus4j/blob/master/Modbus4J/src/com/serotonin/modbus4j/locator/NumericLocator.java" rel="nofollow ugc">https://github.com/infiniteautomation/modbus4j/blob/master/Modbus4J/src/com/serotonin/modbus4j/locator/NumericLocator.java</a></p>
<p dir="auto">If you actually mean the register (two bytes) then I would wonder if you documentation is 1-indexed and your offsets need to be shifted by 1 as Mango is 0-indexed.</p>
<p dir="auto">If you do indeed mean a single byte, then I wonder if that was something bizarre with the device.</p>
]]></description><link>https://forum.mango-os.com/post/15904</link><guid isPermaLink="true">https://forum.mango-os.com/post/15904</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 23 Oct 2017 16:04:06 GMT</pubDate></item></channel></rss>