Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Requirement : Every one hour , the hourly,daily and monthly tables should be

updated .

1. We create a custom property for kwh in each udt , called Val


2. This has the cumulative value of the kwh , and it resets every one hour. For
example , if the time now is 10:00 a.m. , at 11:00 a.m. the val should contain the
kwh value for the past one hour.
3. Every kwh has a tag event script which triggers on value change.
a. We shall have a tag which will tell us if an hour has passed or not
b. Every time the tag triggers after an hour , the value stored in the
custome property Val of each kwh should be inserted into hourly table , while
uodated in Daily and Monthly tables.And then val should be reset to 0
c. During no change of trigger tag , val should be cumulated (take current
kwh and keep adding it to val)
d. Disclaimer : every start of the day , the value should be inserted into
Daily table , every start of the month , first value should be inserted into
Monthly table.

You might also like