<?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[Arduino Modbus library doesn't support floats]]></title><description><![CDATA[<p dir="auto">Hello everybody.</p>
<p dir="auto">I'm using jpmzometa modbus library with mango and works like a charm, but it has a little big... issue: it doesn't support floats.</p>
<p dir="auto">If I make an analog read I will get a 0-1023 value and I can send it with the library but I need to make some operations in mango to convert it to the temperature, pressure,.. value.</p>
<p dir="auto">But sometimes 4 byte precision is needed to send or receive calculations.</p>
<p dir="auto">How can I make some trick to send and receive floats? Think in a network with 15 arduinos sending/receiving 10 floats each one.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://forum.mango-os.com/topic/621/arduino-modbus-library-doesn-t-support-floats</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 00:15:50 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/621.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Nov 2010 11:34:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Arduino Modbus library doesn't support floats on Mon, 08 Nov 2010 08:29:01 GMT]]></title><description><![CDATA[<p dir="auto">The problem with the library is it doesn't support 4 byte types. The writer of the library says that the canonical (and old) rtu specification doesn't support 4 byte types.</p>
<p dir="auto">thank you</p>
]]></description><link>https://forum.mango-os.com/post/4871</link><guid isPermaLink="true">https://forum.mango-os.com/post/4871</guid><dc:creator><![CDATA[jose francisco]]></dc:creator><pubDate>Mon, 08 Nov 2010 08:29:01 GMT</pubDate></item><item><title><![CDATA[Reply to Arduino Modbus library doesn't support floats on Sat, 06 Nov 2010 02:57:16 GMT]]></title><description><![CDATA[<p dir="auto">I'm not sure of the capabilities in Arduino, but i suppose at the least you could get fixed decimal precision, if not floating point. If you can take a value in Arduino that is, say, a decimal(10,5), i.e. 5 orders of magnitude on each side of the decimal place. With 4 bytes you can store from 0 to 4,294,967,295, or 0 to 42,949.67296 if you divide by 100000. So, multiply the number by 100000 and store in 2 x 2 bytes. Then in Mango read the number as a 4 byte unsigned int and give it a multiplier of 0.00001. I think that should do it.</p>
]]></description><link>https://forum.mango-os.com/post/4862</link><guid isPermaLink="true">https://forum.mango-os.com/post/4862</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Sat, 06 Nov 2010 02:57:16 GMT</pubDate></item><item><title><![CDATA[Reply to Arduino Modbus library doesn't support floats on Fri, 05 Nov 2010 15:03:29 GMT]]></title><description><![CDATA[<p dir="auto">Yes, you're right.</p>
<p dir="auto">And, if somebody is listening... I would need a Modbus library for Arduino that supports floats.</p>
<p dir="auto">But, mlohbihler, is it possible to make a trick to use 2+2 bytes to get a 4 byte float?</p>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.mango-os.com/post/4853</link><guid isPermaLink="true">https://forum.mango-os.com/post/4853</guid><dc:creator><![CDATA[jose francisco]]></dc:creator><pubDate>Fri, 05 Nov 2010 15:03:29 GMT</pubDate></item><item><title><![CDATA[Reply to Arduino Modbus library doesn't support floats on Fri, 05 Nov 2010 14:04:48 GMT]]></title><description><![CDATA[<p dir="auto">Just to confirm, this is not a Mango question, correct? I assume you would need a Modbus impl for Arduino that supports floats.</p>
]]></description><link>https://forum.mango-os.com/post/4850</link><guid isPermaLink="true">https://forum.mango-os.com/post/4850</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Fri, 05 Nov 2010 14:04:48 GMT</pubDate></item></channel></rss>