![]() |
Double timer, with time on and off - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Double timer, with time on and off (/showthread.php?tid=4382) |
Double timer, with time on and off - davidchispas - 15.11.2022 Hello, any example of a script for a timer with active operating time and resting time? I have a 1 bit signal from a presence detector. When this signal is activated, I need to create a cycle of: activating a bomb for 5 minutes and then deactivating it for 15 minutes. If after this time cycle, the detector signal is still active or is activated again, repeat the cycle. RE: Double timer, with time on and off - admin - 16.11.2022 Event script: Code: if event.getvalue() then Resident script with sleep time set to 1 second: Code: curr_trig_time = storage.get('presence_time', 0) |