Timer - How to improve - 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: Timer - How to improve (/showthread.php?tid=5785) |
Timer - How to improve - Fcs - 10.12.2024 Hi everyone, I'm using a script found on this forum, by Daniel, I believe, which I've modified a little to suit my needs. The only problem I'm having is that every time a READ passes on the bus, the updatetime value is updated, so my timer doesn't work as expected. Do you have any ideas? Thanks in advance Code: timers = { RE: Timer - How to improve - admin - 11.12.2024 Map an event script to the input object and save the current timestamp in storage: Code: key = 'updatetime_' .. event.dst Then modify your timer script: Code: key = 'updatetime_' .. timer.input RE: Timer - How to improve - Fcs - 12.12.2024 Thanks you, this is the solution I wanted to avoid, I find it very comfortable to have all the timers in one file. I don't yet know how “localbus” works, but couldn't I manage to create a kind of write capture? Is there a place where I can find documentation? RE: Timer - How to improve - admin - 13.12.2024 You can modify one of these scripts to suit your needs: https://kb.logicmachine.net/scripting/staircase-timer/ https://forum.logicmachine.net/showthread.php?tid=5664&pid=36530#pid36530 https://forum.logicmachine.net/showthread.php?tid=5700&pid=36717#pid36717 RE: Timer - How to improve - Fcs - 19.12.2024 Thanks you, I was able to do what I wanted |