This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Store a Value and use it for a calc
#1
Hello Community,

I'm writing for asking help about how to store a value inside a GA and use it as reference for a calculation.
To be more clear I expose my real case:

I've the value of energy consumption measured by a meter. I need to calculate the energy consumption of the last month so I think I'd need to store the value of the previous month in variable and make a subtraction from the actual value.

Code:
Electrical_Consumption_Now = ("32/1/100")-- amount of energy measured by the meter

Electrical_Consumption_previous_month = ....

Electrical_Consumption_calculated = Electrical_Consumption_Now - Electrical_Consumption_previous_month

grp.write(32/1/101, Electrical_Consumption_Calculated)

Hope someone can help me.

Thanks
Reply


Messages In This Thread
Store a Value and use it for a calc - by Tuwat47 - 25.10.2024, 13:08

Forum Jump: