This example only applies when the "The value is aggregated" function is not activated:
- Only the values = "1" are added.
- Time intervals are only recorded when the new value = "1" (Timer).
-
One value is read every 10 minutes between 10:00 a.m. and 11:00 a.m., i.e. six in total. One value is read every 12 minutes between 11:00 a.m. and 12:00 p.m., i.e. five in total. Because the last reading operation takes place at 12:00 p.m. and the evaluation period also ends at 12:00 p.m., the last value is not read. To evaluate the last value at 12:00 p.m., you must set the end of the evaluation period to at least 12:01 p.m.
Time Sum (BOOL) INT Timer (BOOL) In minutes 10:00 1 1 1 + 10 10:10 1 2 1 + 10 10:20 1 3 1 + 10 10:30 1 4 1 + 10 10:40 1 1 1 + 10 10:50 1 2 1 + 10 11:00 0 0 0 11:12 1 3 1 + 12 11:24 1 4 1 + 12 11:36 1 5 1 + 12 11:48 1 2 1 + 12 12:00 1 0 1 + 12 Result 10 27 108 (1 h 48 min) Aggregation function Sum Sum Timer Timer
Evaluation:
- The "Sum" aggregation function returns the result = 10
All values = "1" between 10:00 a.m. and 11:48 a.m. are added. - The "Timer" aggregation function returns the result = 108 minutes (1 hour 48 minutes)
The sum of all time intervals with the state "1" is recorded. The value "1" is read six times between 10:00 and 10:50, with 10-minute intervals between each read. This results in a sum of 60 minutes. No value is read at 11:00. The value "1" is read four times between 11:12 and 12:00. The time interval is 12 minutes each. This results in a sum of 48 minutes. The total is a sum of 108 minutes or 1 hour 48 minutes or 6,480,000 milliseconds.