This article will take you through the steps of creating a 10-minute rolling average for a specific tag.
- Open the Canary Admin>Calculation Tile and click the "ADD" button to create a new calculation group.
- Give your calculation group a name then select the "+" button to add an expression.
- Select the TimeAverage2 aggregate from the Functions list on the right-hand side.
- The first parameter of the function requires the tag name. The user can add the tag by clicking on the Tags tab on the right.
- The second parameter requires a duration. This example is using "10m" for 10 minutes.
- Choose an output tag name for the calculation.
- In this example, the tag is being written to the dataset, "Calculations", and the output tagname is called "10_Min_Roll_Avg". (Note: It is a best practice to store calculated tags in their own dataset separate from other tags.)
- If the user wishes to backfill the calculated data, click the datetime picker and select the desired start date. In this example, the calculation is set to backfill from April 1st.
- The user has the option of triggering the calculation based on frequency of when the value changes or periodically. In this example, the calculation will be performed when the raw tag value changes.
- Click "APPLY" then "CLOSE".
- To start the calculation click the green Play button next to the calculation name.
Comments
0 comments
Article is closed for comments.