Jump to content

Double IF question


wlodekd

Recommended Posts

I would like to check control status and after 2 min wait recheck status.

If condition is still true execute THEN. I would appreciate ideas.

 

It does not seem to me that I can do it with one program.

It may work to have 2 programs. First one checking condition, if condition is TRUE waiting 2 min and recalling second program with IF checking staus and executing THEN. I think that second program should be diabled.

 

Thanks for the help Walter

Link to comment

Unless I'm missing something, I think this is easier than you might think.

 

If you check for a condition, then wait 2 minutes, the program will automatically become false if that condition is no longer true during that 2 minute wait.

 

I do something similar with my office thermostat:

 

If
       Status  'OfficeThermostat' is Mode Cool
   And Program 'Office Work Hours' is False
   And Program 'Office Light Status' is False
   And Status  'OfficeThermostat' < 85° (Setpoint)

Then
       Wait  2 minutes 
       Set 'OfficeThermostat' 85° (Cool Setpoint)

Else
  - No Actions - (To add one, press 'Action')

 

Once my IF conditions all become true, the THEN portion of my program runs. During that 2 minute wait, if any of my IF conditions become false, the program aborts and my 2nd THEN statement never runs.

Link to comment

This is an interesting point to consider. In any other automation device I have used the If section acts as a trigger, and once triggered the Then section completes execution regardless of whether the trigger remains true or not. The idea of a trigger needing to stay triggered thoughout execution is definitely a different paradigm for a lot of folks.

Link to comment

Mike,

 

I failed to provide more detailed information what program should do. Once triggered and rechecked status after 2 min it should run several actions separated with WAIT statements unconditionally. Otherwise if during 2 min CONTROL will change from ON to OFF do nothing.

Link to comment

Hello Walter,

 

First of all, you were 100% correct in your first post. If you use two programs as you described, with the second disabled, all should work as intended. Good job!

 

Second, Mike's suggestion was excellent, and doesn't apply here only because of the added conditions that you noted in a following post. So do go ahead with the two programs, and please let us know how it goes.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...