1) Give a description of the problem
I have a Device variable that will contain a list of physical devices (light switches).
I have a “master” (calling) piston that sets the global variable to the desired list of devices (depending upon which Routine triggered the master piston), and then calls a “slave” (callee) piston which turns those devices ON (relying on the updated value of the global variable). But I have noticed that the global variable does not seem to get updated before the callee piston executes. Instead, it uses the prior value of the global variable. I tried inserting delays, configuring the callee piston to “wait for execution” and a few other things, but nothing seems to work (at least not reliably).
2) What is the expected behaviour?
I would like the global varilable to be updated before I call a piston which relies on the updated value.
I tried passing a local variable as an argument to the callee piston, but discovered that was not supported for Device List varilables.
3) What is happening/not happening?
The callee piston uses the prior (non-updated) value of the global variable.
This seems so simple, but I cant make it work reliably.
Appreciate any suggestions.