20.04.2020, 18:10
(20.04.2020, 06:54)admin Wrote: Try this:sorry 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)
in this first script:
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) - I need this in winter
else
out = delta <= (temp - setpoint) - I need this in the summer
end
end
grp.write ('3/0/206', out)
in WINTER (7/0/0 = 1)
3/0/206 = 1 when the setpoint <temp
3/0/206 = 0 when the setpoint> temp
WORKS IN THE OPPOSITE
I had to do this:
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 not value1 then
out = delta <= (setpoint - temp)
else
out = delta <= (temp - setpoint)
end
end
grp.write ('3/0/206', out)