Logic Machine Forum
schedule for multiple GA - 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: schedule for multiple GA (/showthread.php?tid=3763)



schedule for multiple GA - khalil - 21.12.2021

hello 
I want to use a schedule to turn off some offices lights, but offices might vary so I used script like this :

Is there any recommendation, while the table list will be more (around 50 items)
Code:
value = event.getvalue()

mytable = {67,37,36,16}

for _, mytab in ipairs(mytable) do

  grp.write('1/0/'..mytab,value)


end

regards,


RE: schedule for multiple GA - admin - 21.12.2021

Use tags. This way there's a short delay between writes to each object so the bus is not overloaded.
Code:
value = event.getvalue()
grp.tag('Office_1'):write(value)



RE: schedule for multiple GA - khalil - 21.12.2021

(21.12.2021, 08:44)admin Wrote: Use tags. This way there's a short delay between writes to each object so the bus is not overloaded.
Code:
value = event.getvalue()
grp.tag('Office_1'):write(value)

OK 
many thanks admin