23.03.2022, 16:47
1. Resident script with interval 60(no need to run it more often) Change group addresses as needed. PS it will turn off below lower value too.
2. Create boolean object and create event script on it. Change scriptname to the name of your resident script in point 1
3. Event based script on your global setpoint. Add a tag to all setpoints you want to write to, not to the glogal setpoint object! Change TAG to the tag used in setpoint objects.
Code:
input = grp.getvalue('1/1/1')
lower = grp.getvalue('1/1/2')
upper = grp.getvalue('1/1/3')
result = lower <= input and upper >= input
grp.checkwrite('1/1/4', result)
Code:
value = event.getvalue()
if value then
script.enable('scriptname')
else
script.disable('scriptname')
end
Code:
value = event.getvalue()
myobject = grp.tag('TAG')
myobject:write(value)
------------------------------
Ctrl+F5
Ctrl+F5