22.12.2018, 17:54
Try this
Code:
lux = grp.getvalue('1/1/1')
setpoint = grp.getvalue('1/1/2')
output = '1/1/3'
hysteresis = 20 --in %
Limit_ON = setpoint - ((hysteresis/100)*setpoint)
Limit_OFF = setpoint + ((hysteresis/100)*setpoint)
if (lux >= Limit_OFF) then
grp.checkwrite(output, false)
elseif (lux <= Limit_ON) then
grp.checkwrite(output, true)
end
------------------------------
Ctrl+F5
Ctrl+F5