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.

How to execute a script
#1
Hi everyone,

I don't understand why LM doesn't execute this Event Based script when I upload a Value. I tried to upload GA fmanually, but the result of my calcs don't change, the value is always 0.

Can someone explain me how to trigger it?

Thanks 
Code:
--Variables App. Dx
AppDx_Consumo_Radiante_Caldo = ("32/1/200")-- consumo radiante caldo Dx
AppDx_Consumo_Radiante_Freddo = ("32/1/201")-- consumo radiante freddo Dx
AppDx_Volume_ACS = ("32/1/202")-- consumo ACS Dx
Energia_Termica_Appartamento_Dx = grp.write("32/1/204") -- uscita

--Variables App. Sx
AppSx_Consumo_Radiante_Caldo = ("32/1/210")-- consumo radiante caldo Sx
AppSx_Consumo_Radiante_Freddo = ("32/1/211")-- consumo radiante freddo Sx
AppSx_Volume_ACS = ("32/1/212")-- consumo ACS Sx
Energia_Termica_Appartamento_Sx = grp.write("32/1/214") -- uscita

-- Other Variables
K = grp.write("32/1/215") -- rapporto conversione elettrico / termico

Consumo_Elettrico_PDC = ("32/1/216")-- consumo elettrico misurato
Consumo_Elettrico_Dx = grp.write("32/1/217")
Consumo_Elettrico_Sx = grp.write("32/1/218")

-------------------------------non toccare più nulla sotto questa riga------------------------------------------
Rad_Heat_Dx = grp.getvalue(AppDx_Consumo_Radiante_Caldo)
Rad_Cool_Dx = grp.getvalue(AppDx_Consumo_Radiante_Freddo)
Acs_Dx = grp.getvalue(AppDx_Volume_ACS)

Rad_Heat_Sx = grp.getvalue(AppSx_Consumo_Radiante_Caldo)
Rad_Cool_Sx = grp.getvalue(AppSx_Consumo_Radiante_Freddo)
Acs_Sx = grp.getvalue(AppSx_Volume_ACS)

Cons_Elet_PDC = grp.getvalue(Consumo_Elettrico_PDC)

-- Energia Termica Appartamento Dx
Energia_Termica_Appartamento_Dx = Rad_Heat_Dx + Rad_Cool_Dx + (Acs_Dx * 40.6)

-- Energia Termica Appartamento Sx
Energia_Termica_Appartamento_Sx = Rad_Heat_Sx + Rad_Cool_Sx + (Acs_Sx * 40.6)

-- Rapporto conversione Cons_Elet_PDC / Consumo_Termico_Totale
K = Cons_Elet_PDC / (Energia_Termica_Appartamento_Dx + Energia_Termica_Appartamento_Sx)

-- Consumo Elettrico Appartamento Dx
Consumo_Elettrico_Dx = K * Energia_Termica_Appartamento_Dx
 
-- Consumo Elettrico Appartamento Sx
Consumo_Elettrico_Sx = K * Energia_Termica_Appartamento_Sx
Reply


Messages In This Thread
How to execute a script - by Tuwat47 - 25.10.2024, 09:21
RE: How to execute a script - by Daniel - 25.10.2024, 09:29
RE: How to execute a script - by Tuwat47 - 25.10.2024, 10:20

Forum Jump: