X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: emil on October 26, 2011, 08:11:14 AM

Title: Are macros re-entrant?
Post by: emil on October 26, 2011, 08:11:14 AM
If a macro is running and it gets triggered again does another instance of the macro start to run even though the first instance is still running?

I had my system running great for a few years without fail but of course I decided to expand.
I'm having a heck of a time getting consistent results now.
Title: Re: Are macros re-entrant?
Post by: Tuicemen on October 26, 2011, 08:34:05 AM
Yes the macro can and will run again if it is already running.
A way to prevent this is use a flag condition that if on the macro won't run
next add a set flag (same as the condition) at the start of the macro.
at the last step of the macro add a clear flag (same number as the set flag)
 >!
Title: Re: Are macros re-entrant?
Post by: emil on October 26, 2011, 09:08:48 AM
Thanks!