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.

BOOSTER CONDIZIONATO
#18
Like this:
Code:
event_value = event.getvalue()
summer = grp.getvalue('7/0/0') -- summer / winter

if event_value then
  out_value = grp.getvalue('3/3/1')
else
  out_value = 0
end

if summer then
  out_addr = '6/0/91'
else
  out_addr = '6/0/101'
end

grp.write('2/0/91', event_value)
grp.write(out_addr, out_value)

Your current script will fail with an error because you have single "-" instead of double dash for a comment.
This line will be evaluated an arithmetic expression "X = A - B / C"
Code:
value_3 = grp.getvalue ('7/0/0') - summer / winter
Reply


Messages In This Thread
BOOSTER CONDIZIONATO - by Hosutech - 06.03.2020, 14:54
RE: BOOSTER CONDIZIONATO - by admin - 06.03.2020, 15:28
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 05:49
RE: BOOSTER CONDIZIONATO - by Daniel - 06.03.2020, 16:26
RE: BOOSTER CONDIZIONATO - by Hosutech - 09.03.2020, 13:10
RE: BOOSTER CONDIZIONATO - by Daniel - 09.03.2020, 13:21
RE: BOOSTER CONDIZIONATO - by Hosutech - 09.03.2020, 13:30
RE: BOOSTER CONDIZIONATO - by Daniel - 09.03.2020, 13:31
RE: BOOSTER CONDIZIONATO - by Hosutech - 15.04.2020, 21:38
RE: BOOSTER CONDIZIONATO - by Daniel - 16.04.2020, 07:22
RE: BOOSTER CONDIZIONATO - by Hosutech - 17.04.2020, 07:40
RE: BOOSTER CONDIZIONATO - by Daniel - 17.04.2020, 08:23
RE: BOOSTER CONDIZIONATO - by Hosutech - 17.04.2020, 19:18
RE: BOOSTER CONDIZIONATO - by admin - 20.04.2020, 06:15
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 06:48
RE: BOOSTER CONDIZIONATO - by admin - 20.04.2020, 06:54
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 09:35
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 18:10
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 21:06
RE: BOOSTER CONDIZIONATO - by admin - 20.04.2020, 11:17
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 15:48
RE: BOOSTER CONDIZIONATO - by admin - 20.04.2020, 16:00
RE: BOOSTER CONDIZIONATO - by Hosutech - 20.04.2020, 17:09

Forum Jump: