Please login or register.

Login with username, password and session length

Author Topic: Macro Embedding.  (Read 7273 times)

Xytsrm

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 15
Macro Embedding.
« on: September 13, 2008, 10:49:20 PM »

Greeting,

I have been doing some experiments with embedded macros, and have come across a curious anomaly that appears to be required in order for a macro, embedded within another macro, to function.

In this experiment the outer unconditional-macro F6, comprises the following steps:

Appliance-Control - N2(on); where N2 is a conditional macro
Lamp-Module - HU(on); turns on a lamp
Lamp-Module - HU(on); turns on a lamp

As structured above, even though the Activity Monitor shows the N2 activation and the condition is TRUE, the instructions within N2 fail to execute.  However, simply placing a delay of 1 second (or greater, not zero) ahead of the N2 Appliance-Control and the instructions in both macros function correctly.   To add to the curiosity, normally F6 is activated by an RF-Command from the CM15A, however, if I manually click-on the "Run Macro" of F6 (without the delay), part of N2, and part of F6 functions.  [Note: In other similar embedded macros I have seen all macros function correctly when manually activated, but to get them to function under program-control I always have to put a delay (at least 1sec, and sometimes more) in front of the embedded macro.]

Any of you guys who have knowledge of the CM15A internals know what's going on?

Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Macro Embedding.
« Reply #1 on: September 13, 2008, 11:39:53 PM »


I .............. have come across a curious anomaly that appears to be required in order for a macro.........
 simply placing a delay of 1 second (or greater, not zero) ahead of ......... to get them to function under program-control I always have to put a delay (at least 1sec, and sometimes more) in front of the embedded macro.]


Interesting to read about that being called an anomaly..... many of us except this as normal. The best technical  explanation I have: Delays inserted in macros act as magic pixie dust.

Much has been written/posted about this here at the forum.
Logged
Home Automation is an always changing technology

Xytsrm

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 15
Re: Macro Embedding.
« Reply #2 on: September 14, 2008, 01:37:07 AM »

Hi Dave,

While I independently discovered the efficacy of inserting delays in macros, before I discovered this forum; I also acknowledge the significant time devoted to discussing the topic.  However, I have yet to find an explanation of why it has an affect on the execution of macro instructions.  I suppose if one were to use it regularly, it could eventually be considered normal, however on the surface it would appear to be superfluous; hence my reference to it as an anomaly.  It appears to be a timing issue, and granted AHP was not designed with the intent of having macros activate other macros, but an understanding why it works could result in more efficient embedded macros.

Cheers,

X
Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Macro Embedding.
« Reply #3 on: September 15, 2008, 08:33:52 AM »

........... an understanding why it works could result in more efficient embedded macros.

I am sure your right.... I guess I am just not that technical.
Logged
Home Automation is an always changing technology
 

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