In this example, we will set up a rate of change calculation over a specific time period. This can then be viewed as a trend, used in applications, or even set up as an alarm event. In this example we will use the delta aggregate. The delta aggregate is the difference between the start and end bound values of the time interval. Here is how to set it up.
- First, name the calculation. In this example we will call it Rate of Change.
- Next, choose the frequency, whether the calculation will trigger on a tag's value change or periodically. This can vary based on the production process. We have chosen a periodic frequency and set the time interval to 10 minutes.
- Click the "+" button, next to the Details drop-down menu, to add an expression.
- Select the Delta function from the Functions list on the right by clicking the "+" button.
- Between the first set of quotes is where the tag name should be placed. Select the tag from Tags list on the right by clicking the "+" button.
- The next set of quotes contains the aggregate interval. This calculation will monitor the rate of change with an aggregate interval of 10 min. The aggregate interval does NOT have to match the frequency of when the calculation is triggered. In this example, we are finding a 10 minute delta every 10 minutes.
- The next step is to specify an output tag. The tag name must be prepended with the Dataset name. In this example, we are writing the tag to the "Calc Tags" dataset. The tagname itself is "RoC".
As a best practice, we recommend creating a dataset just for calculated tags.
- Click the Evaluate button to make sure the calculation is returning values.
- Click Apply, then Close.
- When closing the calculation, the user will be presented with the main calculation page and the ability to start or stop evaluating the calculation. Click the green Play button next to the calculation to start it.