TOTAL
Parameters
Order | Name | Type | Desc |
---|---|---|---|
1 | a | point list | A list of points that have history |
2 | b | Const | Optional Time-scale in seconds for the total (defaults to 1 second) |
Returns
Returns a point list without any history and the live values replaced with the total calculated from history.
Description
This function is used convert points that have history (ie. from a call to GETHISTORY) into a total.
This calculates the total as if the figure is a rate over time. For example, it can be used to calculate the total amount of product produced or energy used in a given time-frame.
Note that the generated total ignores any times when the signal returns to zero. This means that you can take a value from an hourly/daily totaliser and calculate accurate results over larger time-frames without the drops having an effect on the count.
The optional time-scale parameter controls the time-basis for the final measurement. Without the parameter, the calculation will be per second.
With a time-scale of 60, your results will be per minute, and at 1440 you'll have an hourly total.