Accumulator tag returns a numeric value that increases incrementally when the source tag's value changes. Whereas the similar Counter only registers value change events in the source tag, an accumulator also uses that value to compute its own.
Parameters
Data type cannot be set to boolean since this tag always returns a numerical value. For other tag parameters not covered herein, see Tag Editor.
Manual
Check to prevent automatic tag incrementation. This will disable the Time unit and Source tag settings below. The tag will display the numerical value entered in the HMI, e.g., in the Tag Lookup interface; switching back to automatic will increment the manually entered value on the next update cycle.
Manual value entry requires the tag to be made writable.
Time unit
The accumulator consistently returns a value that approximately matches the result of summing two source tag values separated by one hour, day, or week, depending on which is selected as the Time unit; find detailed explanation below.
+Accumulation Principle
The accumulator works by sampling the source tag’s value every time it updates and solving the following equation:
$ f(x_{n-1}) $ is the previous value of the accumulator;
$ V_{n-1} + V_n $ represents the summation of the previous and current value of the source tag;
$ T_n - T_{n-1} $ represents the time elapsed between the latest sampling and the preceding sampling, in milliseconds;
$ P $ is the coefficient based on the selected Time unit:
$ 3.6\times10^6 $ if Hours
$ 86.4\times10^6 $ if Days
$ 604.8\times10^6 $ if Weeks
Source tag
Tag whose value is monitored by the accumulator, must have a scalar data type. Note that the interface will not show the selected tag’s output type.
Although the source tag may have a boolean data type, it will be interpreted by the accumulator as a numerical value that is either 1 or 0, the accumulation of which might not be practical. Counter is recommended for use with such tags.
Writable
Check to allow manual override of the tag’s value in HMI. Manual overrides will be recorded under Audit Log.
Example
The tag below is configured to perform an hourly accumulation of the readings received from power_meter: