20.04.2020, 09:35
(20.04.2020, 06:54)admin Wrote: Try this:Thanks Edgard,
Code:value_1 = grp.getvalue('7/0/0')
value_3 = grp.getvalue('6/0/1')
temp = grp.getvalue('2/2/1')
setpoint = grp.getvalue('2/2/11')
delta = grp.getvalue('3/1/201')
out = false
if not value_3 then
if value1 then
out = delta <= (setpoint - temp)
else
out = delta <= (temp - setpoint)
end
end
grp.write('3/0/206', out)
before inserting your new script for which I am grateful, I would like to better understand what the result will be as, with this formula, I seem to understand that the address 3/0/206 is sent only if the two conditions are verified in turn filtered from summer / winter.
I must point out that the 3/0/206 triggers an additional event script:
WINTER
value_1 = event.getvalue ()
value_2 = grp.getvalue ('3/3/1')
value_3 = grp.getvalue ('7/0/0') - summer / winter
if (value_1 == true) and (value_3 == true) then
grp.write ('2/0/91', true)
grp.write ('6/0/91', value_2)
else
grp.write ('2/0/91', false)
grp.write ('6/0/91', 0)
end
SUMMER
value_1 = event.getvalue ()
value_2 = grp.getvalue ('3/3/1')
value_3 = grp.getvalue ('7/0/0') - summer / winter
if (value_1 == true) and (value_3 == false) then
grp.write ('2/0/91', true)
grp.write ('6/0/101', value_2)
else
grp.write ('2/0/91', false)
grp.write ('6/0/101', 0)
end