Logic Machine Forum
Status request at init - 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: Status request at init (/showthread.php?tid=694)



Status request at init - josep - 24.03.2017

Hello,

I need to know if it's possible to send a status request to all the statusĀ group adresses when LM is initializating, on the other hand I like to know if it's possible to save group values in memory for a internal values, THX!


RE: Status request at init - Erwin van der Zwart - 24.03.2017

Hi,

Add tag 'status' to all your objects that needs to be read on init and put these 2 lines in your start-up script: (make sure you have read flag enabled on your objects fromĀ ETS)

Code:
statusobjects = grp.tag('status')
statusobjects:read()

If you have a lot of objects make sure to request them in a couple of requests with a os.sleep between them and tag them status1, status2 etc..

BR,

Erwin