Algorithm Min and Max Intervals

It is easy to think of the algorithm object as a container for “the algorithm.” But, it has its own set of properties to configure. One of those important properties is Interval.

Consider a simple algorithm that consists of a Data Source Block, a tag name on the Data slot, and a connection to the result block.

Figure 63.   Algorithm illustrating interval properties
Image
 TIP: For debugging, it is best to use pass-through algorithms and Analytic ORD schemes to help you visualize the data that the algorithm is processing. Debug blocks do not provide the same insight, especially if you are just starting out with Niagara Analytics. 

On the left side of the illustration above, the passthrough1 algorithm's Min Interval property is set to Ten Minutes. The right side of the illustration above shows a table with the results of resolving this ORD:

analytictrend:data=alg:passthrough1&interval=none&timeRange=lastMonth

The ORD is an analytic trend request processing the algorithm with an interval of none (special handling, which essentially means show every record) and a time range of last month. Even though the interval equals none, the resulting Collection Table shows one row every 10 minutes. This is because the Min Interval property on the algorithm object is set to Ten Minutes. This property is on the algorithm, not on any object that you see on the Wire Sheet.

If you were to specify a Max Interval of Hour on the algorithm property sheet, and then specify an interval of Day in the Analytic Trend ORD, you would see a similar result. The Max Interval value on the algorithm would override what you specified on the ORD, and you would ultimately end up with a one hour rollup.

In summary, when you see an unexpected rollup interval, check to see that no one has set a Max Interval, or a Min Interval on the algorithm property sheet.