<?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[How to implement metadata?]]></title><description><![CDATA[<p dir="auto">I have a Data point from a MODBUS device that I read on a periodic basis.<br />
The raw data from the device must be run through a calculation in order to display in the graphical view widget.</p>
<p dir="auto">I was trying the Metadata data point and was not able to get it to work.<br />
my calculation is simple in javascript:<br />
var my = (p1-640)/16.0;<br />
return my;</p>
<p dir="auto">does not seem to work, meaning the graphical widget does not update.</p>
<p dir="auto">What am I missing, is there an example similar to this?</p>
]]></description><link>https://forum.mango-os.com/topic/2552/how-to-implement-metadata</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 06:10:12 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/2552.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Nov 2016 14:46:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to implement metadata? on Fri, 18 Nov 2016 18:43:01 GMT]]></title><description><![CDATA[<p dir="auto">OK, cool, I will try that as well...Thanks!</p>
]]></description><link>https://forum.mango-os.com/post/13298</link><guid isPermaLink="true">https://forum.mango-os.com/post/13298</guid><dc:creator><![CDATA[tcontrada]]></dc:creator><pubDate>Fri, 18 Nov 2016 18:43:01 GMT</pubDate></item><item><title><![CDATA[Reply to How to implement metadata? on Fri, 18 Nov 2016 16:13:05 GMT]]></title><description><![CDATA[<p dir="auto">No problem! Just so you know, these calculations could probably be performed in the modbus point locator, which would probably be more efficient. It's value*multiplier + additive, so</p>
<p dir="auto">(value-640)/16 --&gt; value*.0.0625 - 40 would be equivalent, so multiplier=0.0625 additive=-40 but there can be benefits to using a Meta point, if you're wanting to keep the raw values around too for some reason.</p>
]]></description><link>https://forum.mango-os.com/post/13295</link><guid isPermaLink="true">https://forum.mango-os.com/post/13295</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 18 Nov 2016 16:13:05 GMT</pubDate></item><item><title><![CDATA[Reply to How to implement metadata? on Fri, 18 Nov 2016 15:29:22 GMT]]></title><description><![CDATA[<p dir="auto">I see, working now....Thanks!</p>
]]></description><link>https://forum.mango-os.com/post/13294</link><guid isPermaLink="true">https://forum.mango-os.com/post/13294</guid><dc:creator><![CDATA[tcontrada]]></dc:creator><pubDate>Fri, 18 Nov 2016 15:29:22 GMT</pubDate></item><item><title><![CDATA[Reply to How to implement metadata? on Fri, 18 Nov 2016 15:12:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi tcontrada,</p>
<p dir="auto">i would have written that as</p>
<p dir="auto"><code>return (p1.value - 640)/16.0;</code></p>
<p dir="auto">the "my" would probably be aliasing the variable name for the point to refer to itself, and one should call for the .value property of the context point.</p>
<p dir="auto">I do not know what you mean, "does not seem to work, meaning the graphical widget does not update." but I suspect the problem is the same. Check it on the data point details page if you are making a custom dashboard, just so one can more easily know where things are going wrong.</p>
]]></description><link>https://forum.mango-os.com/post/13293</link><guid isPermaLink="true">https://forum.mango-os.com/post/13293</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 18 Nov 2016 15:12:04 GMT</pubDate></item></channel></rss>