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.

disconnection delay
#1
Hello, I need to integrate a disconnection delay when all objects are FALSE, but in case it returns to TRUE for some reason, let the countdown stop. Then when it goes back to FALSE the account is reset again.

I did it for events but I don't know if it is the best option ...



Code:
1234567891011121314151617181920
Output = '1/1/10' myobjects = grp.tag('EXTRACTION') ------------------------------------- sum = 0   for _, obj in ipairs(myobjects) do     if obj.value then         sum = sum+1     end   end log(sum) if sum > 0 then grp.checkwrite(Output, true)   else --sleep(120) grp.checkwrite(Output, false)   end
Reply
#2
See how delay was done here
https://forum.logicmachine.net/showthrea...3#pid22863
------------------------------
Ctrl+F5
Reply


Forum Jump: