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.

Time delay command: suggestion
#1
Hi,
I am preparing a logic to manage an heating system.

Considering that I have to set TOF or TON (set to ON or OFF a grp address only if the condition is valid for more than 5 or 10 minutes). 

Using "os.delay"  for minutes is not suggested as you know.

Which is the best approach to manage it?

Thanks.

BR
Reply
#2
You can use os.sleep together with an event script that use "Last instance only" execution mode. But this will only work if the condition is not repeated because that will restart the script.

Alternatively this solution can be adapted to your needs: https://kb.logicmachine.net/scripting/on...lay-timer/
Reply
#3
(6 hours ago)admin Wrote: You can use os.sleep together with an event script that use "Last instance only" execution mode. But this will only work if the condition is not repeated because that will restart the script.

Alternatively this solution can be adapted to your needs: https://kb.logicmachine.net/scripting/on...lay-timer/

Thank you Admin. I think that the example is the best way.

Only a confirmation: group address 1/1/1 and 1/1/3 in the example are 1 bit group address?

Thanks.

BR.
Reply
#4
Yes, the example script adds an optional on/off delay between 1-bit input and output.
Reply


Forum Jump: