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.

Event Scripting
#1
Hello,
I am using event script to control auto/manual function for heating system.

If the users set manual, it will turn the auto after the entered time. But I have two question;

1- How can I stop the timer if user set the auto before the entered time expires?
2- How can I retrigger the delay time if the user set auto before the entered time expires and then set manual with new time? 

Thanks.

The event script is;

Code:
--auto/manual status
value = event.getvalue()
--duration of manual in minute
duration = grp.getvalue('33/1/53')
second = duration * 60
if value == false then
  os.sleep(second)
    grp.write('33/1/55', true)
end 
Reply


Messages In This Thread
Event Scripting - by Ibrahim - 08.03.2023, 11:21
RE: Event Scripting - by Daniel - 08.03.2023, 11:25
RE: Event Scripting - by Ibrahim - 08.03.2023, 11:39
RE: Event Scripting - by Daniel - 08.03.2023, 11:40
RE: Event Scripting - by Ibrahim - 08.03.2023, 11:53
RE: Event Scripting - by Daniel - 08.03.2023, 11:54
RE: Event Scripting - by Ibrahim - 08.03.2023, 12:02
RE: Event Scripting - by Daniel - 08.03.2023, 12:35
RE: Event Scripting - by Ibrahim - 08.03.2023, 13:36
RE: Event Scripting - by admin - 08.03.2023, 14:26

Forum Jump: