Jump to content

evaluation of time intervals in a program?


Recommended Posts

Posted

How are time intervals in a program IF statement evaluated? I have a small heater in a bedroom closet that I want to turn on (plugged into a insteon on/off module) but only when I'm likely to be going into the closet, i.e. in the morning or late evening.  I understand how to program a schedule, so my question is how does the ISY evaluate the IF statement?  Only once when the time hits the "FROM" time?   Every minute thereafter, until the "TO: time is reached + 1 and the IF statement turns false?   I ask because it seems that if the IF statement is reevaluated frequently or every minute it could impose a significant burden on the ISY, while its busy trying to run other programs....

Posted
1 hour ago, inovermyhead said:

How are time intervals in a program IF statement evaluated? I have a small heater in a bedroom closet that I want to turn on (plugged into a insteon on/off module) but only when I'm likely to be going into the closet, i.e. in the morning or late evening.  I understand how to program a schedule, so my question is how does the ISY evaluate the IF statement?  Only once when the time hits the "FROM" time?   Every minute thereafter, until the "TO: time is reached + 1 and the IF statement turns false?   I ask because it seems that if the IF statement is reevaluated frequently or every minute it could impose a significant burden on the ISY, while its busy trying to run other programs....

Not quite. ISY evaluates the From and To only twice at the two times. When another trigger in the If section triggers an evaluation of the If section, a From/To is evaluated and is True between the two times, and False outside of the From/To times. Also From will run Then, and To will run Else sections when used alone.

A single time trigger is true only when it is being evaluated because it triggered the evaluation. This means two event triggers will never evaluate to True simultaneously.

If
....At time 3:30 PM
....AND
.... Switchlinc is switched On

can never run Then, as both events can never be true at the same time. While one is being evaluated as a trigger the other condition is always False.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...