<?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[Quantized logging period]]></title><description><![CDATA[<p dir="auto">Hi Mango developers!</p>
<p dir="auto">I need to report minute averages for two data points. The first point "A" is acquired directly from a modbus device and the second "B" is the value of "A" * 46.006 / 24.5.<br />
So I've configured the modbus data point (A) to poll every second and to logg averages every minute. For "B" I've created a meta data point with "A" as context updater:</p>
<p dir="auto">return p20.value * 46.006 / 24.5;</p>
<p dir="auto">B is also logging average on a 1 minute interval.</p>
<p dir="auto">Well, this works fine, except that A and B minute averages values won't match. If I manually calculate the B minutes averages using A averages they are slightly different.<br />
This is because both averages were calculated in different times, e.g.:</p>
<p dir="auto">Averages for A values are calculated and logged over the <strong>PAST</strong> 60 seconds values at the 30th second every minute, while B averages are calculated at the 17th second. This result in values being shifted by 13 seconds, so the logged values can't be correlated using the formula.</p>
<p dir="auto">This 30 and 17 seconds are not random. They are related to the time I enabled the data point or data source. So Mango will logg the first value 60 seconds after the data point got enabled. This is fine but, in that case, average calculation should be done using the <strong>PREV</strong> method instead the <strong>PAST</strong> method, so averages are calculated over the data between the start and end of a particular period (quantized).</p>
<p dir="auto">A workaround for this may be enabling both data point at the same second of any minute, this result in much comparable values, but it will last just until the next system or data source / point restart.</p>
<p dir="auto">I think it would be nice to quantize, not only the polling time, but also the logging period.</p>
]]></description><link>https://forum.mango-os.com/topic/1603/quantized-logging-period</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 11:59:51 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1603.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Jul 2014 20:59:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Quantized logging period on Wed, 24 Sep 2014 18:47:01 GMT]]></title><description><![CDATA[<p dir="auto">A second workaround is  to set the your poll  every  minute with quantize,and logtype on change,then the B,and a,B averages  will log at the same time</p>
]]></description><link>https://forum.mango-os.com/post/9301</link><guid isPermaLink="true">https://forum.mango-os.com/post/9301</guid><dc:creator><![CDATA[hussam]]></dc:creator><pubDate>Wed, 24 Sep 2014 18:47:01 GMT</pubDate></item><item><title><![CDATA[Reply to Quantized logging period on Sat, 13 Sep 2014 11:17:14 GMT]]></title><description><![CDATA[<p dir="auto">I second the need for synchronized logging data points.</p>
]]></description><link>https://forum.mango-os.com/post/9236</link><guid isPermaLink="true">https://forum.mango-os.com/post/9236</guid><dc:creator><![CDATA[Balistar]]></dc:creator><pubDate>Sat, 13 Sep 2014 11:17:14 GMT</pubDate></item><item><title><![CDATA[Reply to Quantized logging period on Tue, 22 Jul 2014 21:21:02 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Joel. I'll watch any news regarding this.</p>
]]></description><link>https://forum.mango-os.com/post/8816</link><guid isPermaLink="true">https://forum.mango-os.com/post/8816</guid><dc:creator><![CDATA[aoliver]]></dc:creator><pubDate>Tue, 22 Jul 2014 21:21:02 GMT</pubDate></item><item><title><![CDATA[Reply to Quantized logging period on Tue, 22 Jul 2014 21:12:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi Alvaro,</p>
<p dir="auto">Thanks for the detailed explanation.  This is something we will definitely take a look at.</p>
<p dir="auto">Thanks,<br />
Joel.</p>
]]></description><link>https://forum.mango-os.com/post/8815</link><guid isPermaLink="true">https://forum.mango-os.com/post/8815</guid><dc:creator><![CDATA[JoelHaggar]]></dc:creator><pubDate>Tue, 22 Jul 2014 21:12:55 GMT</pubDate></item></channel></rss>