Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Timed Event Execution Priority? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 27 2013 at 07:51 | IP Logged Quote GadgetGuy

I have several time critical macros that control our home
theater at the start and end of a session. The timing of
light, screen, curtain control as well as the sequencing
of the AV equipment is critical for an overall smooth
experience.

To assure continuous execution, these macros have no WAIT
commands embedded in them that would allow other macros
to break into the execution queue and take over control.

For further continuity assurance at the beginning of
these macros, I turn off all probable occurring Triggers
to prevent them from interrupting.

BUT Timed Events seem to be able to break into execution
(as evidenced by event entries in the Event Log and by
the 2-3 times length of time my Theater macro needs to
run when these breakins occur). Unfortunately I have
several that are complex and take awhile to execute (and
have WAITS sprinkled throughout to allow others to
interrupt). Because these Timed Events run every 10 or
15 minutes, it is highly probably they will interrupt a
Theater Scene process.

Thus the question . . .

Is there any way to prevent Timed Events from
interrupting another executing macro, or must I just set
a Global flag when my Theater macro starts that is tested
in the Boolean field of the Timed Event. But then what?
I don't want to abort the Timed Event occurrence, just
hold it off until the higher priority Theater event is
finished.

This has had me bugged for over a year, and I'm now
trying to figure out a way to not have so many of my
theater sessions stumble.   


__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
gg102
Senior Member
Senior Member


Joined: January 29 2013
Location: United States
Online Status: Offline
Posts: 245
Posted: January 29 2013 at 09:42 | IP Logged Quote gg102

Just a thought, but have you thought about turning off the timed events?

ph_timedeventsctrl( "off",0 )
Back to Top View gg102's Profile Search for other posts by gg102
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 29 2013 at 15:56 | IP Logged Quote GadgetGuy

Awesome! I was not aware of that function. That sure seems to do
what I want.

Dave doesn't think that they should be interrupting my macro's
execution stream like they are, but since I am traveling, and not home
now to dump and export code, I can't send him anything to look at for
now.

But I'll save your suggestion to try. Thanks!

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum