Please login or register.

Login with username, password and session length

Author Topic: Are macros re-entrant?  (Read 4232 times)

emil

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 100
Are macros re-entrant?
« 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.
Logged
ActiveHomePro 3.310
SmartMacros 3.310

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 279
  • Posts: 10396
  • I don't work for X10, I use it successfuly!
    • Tuicemen Forum
Re: Are macros re-entrant?
« Reply #1 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)
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

emil

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 100
Re: Are macros re-entrant?
« Reply #2 on: October 26, 2011, 09:08:48 AM »

Thanks!
Logged
ActiveHomePro 3.310
SmartMacros 3.310
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.