Dynamic timers for visualization - 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: Dynamic timers for visualization (/showthread.php?tid=262) |
Dynamic timers for visualization - edgars - 04.04.2016 Task: There are 6 group addresses 1/1/1, 1/1/2...1/1/6 If any of these grp addresses are triggered to value 1 (RFID card is triggered), we launch respective timer for 10 min. (i.e. there are 5 independent timers). Once timer is over, we write 0 to this grp address. Also, make possible these timers dynamically appear on visualization. Script: Resident / sleep time = 1 1/1/1..6 - objects where we write 1 when RFID card is triggered (boolean) 2/1/1..6 - objects where timer value is written starting 10 min from last reading (14 byte ASCII string) Code: if not timers then |