<?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[Scaling a data point]]></title><description><![CDATA[<p dir="auto">It would be great if it was possible to scale a data point in the data point Properties eg: have a section by the text rendering properties where a  device span and engineering span could be put in.<br />
device span :  min= 0, max = 4095<br />
engineering span: min= 0 , max= 100<br />
unit = %<br />
This would convert a 12 bit analog signal to a  0 to 100%<br />
currently I am solving the problem by making a meta data source and a data point for each unit I need to scale.  I think adding it to the original data point properties will make it a lot easier when doing bulk configurations in excel.</p>
]]></description><link>https://forum.mango-os.com/topic/3309/scaling-a-data-point</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 16:16:28 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3309.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Feb 2018 18:29:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Scaling a data point on Fri, 02 Mar 2018 16:28:30 GMT]]></title><description><![CDATA[<p dir="auto">If done that way it would still appear as the rendered value in API queries and whatnot. A virtual point with two point links to and from the scaled point, with links like:</p>
<p dir="auto">unscaled to scaled:</p>
<pre><code>if(source.time &lt;= target.time)
  return UNCHANGED;
TIMESTAMP=source.time;
return ((source.value/4095)*100).toFixed(0);
</code></pre>
<p dir="auto">scaled to unscaled:</p>
<pre><code>if(source.time &lt;= target.time)
  return UNCHANGED;
TIMESTAMP=source.time;
return ((source.value/100)*4095).toFixed(0);
</code></pre>
<p dir="auto">Will permit you to set or display whichever point suits the purposes.</p>
]]></description><link>https://forum.mango-os.com/post/17540</link><guid isPermaLink="true">https://forum.mango-os.com/post/17540</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Mar 2018 16:28:30 GMT</pubDate></item><item><title><![CDATA[Reply to Scaling a data point on Fri, 02 Mar 2018 05:12:11 GMT]]></title><description><![CDATA[<p dir="auto">Hi Philip</p>
<p dir="auto">Thanks for the response.  I didn't think about the fact that the rendered text would not be logged and that would only make it a semi useful.  Maybe there could be a tick box  for which .value should be logged either.  There are a number of reasons why I don't like to scale at the edge..  But I also understand that this suggestion is encroaching on what the meta point was made for...</p>
]]></description><link>https://forum.mango-os.com/post/17537</link><guid isPermaLink="true">https://forum.mango-os.com/post/17537</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Fri, 02 Mar 2018 05:12:11 GMT</pubDate></item><item><title><![CDATA[Reply to Scaling a data point on Fri, 02 Mar 2018 04:38:46 GMT]]></title><description><![CDATA[<p dir="auto">Hi CraigWeb,</p>
<p dir="auto">Thanks for the suggestion! I can definitely see adding this as a new type of text renderer. But, that wouldn't store the value as the 0-100%, only convert it for display. If you want it stored as that value, I do think either a meta point or converting it at the edge device is the current solution, as you suggest, or associating the range with it and then handling this logic in the UI.</p>
<p dir="auto">Presumably you also want this point to convert the set value outbound from 50% to 2047, right?</p>
]]></description><link>https://forum.mango-os.com/post/17494</link><guid isPermaLink="true">https://forum.mango-os.com/post/17494</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 02 Mar 2018 04:38:46 GMT</pubDate></item></channel></rss>