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.

On time delay
#2
First, create an event script attached to your setpoint and feedback objects (replace 1/1/1 and 1/1/2 with your group addresses):
Code:
setpoint = grp.getvalue('1/1/1')
feedback = grp.getvalue('1/1/2')
value = setpoint * feedback / 100

if value <= 10 then
  storage.set('timer', os.time())
end

Then, create a resident script with 30 or 60 second sleep time (or you can use a scheduled script that runs every minute):
Code:
delta = os.time() - storage.get('timer', 0)
value = delta >= 1800
grp.checkwrite('14/2/1', value)
Reply


Messages In This Thread
On time delay - by Frankg - 05.10.2017, 13:13
RE: On time delay - by admin - 05.10.2017, 13:30
RE: On time delay - by Frankg - 05.10.2017, 18:35
RE: On time delay - by admin - 06.10.2017, 07:59
RE: On time delay - by Frankg - 06.10.2017, 08:08
RE: On time delay - by admin - 06.10.2017, 08:41

Forum Jump: