Jump to content

Does Re-Running IF Restart the Program


jgcharlotte

Recommended Posts

The ceiling fan mirrors the status of the fireplace internal fan, except when the fireplace fan turns off, the ceiling fan runs for another 10 minutes.

If the fireplace fan turns back on during the 10 minute wait cycle, will running the STOP program IF dump the 10 minute timer and start over or will it time out and turn off?

 

Den Ceiling Fan WRUN - [ID 011C][Parent 011B]

If
        Control '_Den Fireplace Fan RUNNING' is switched On
 
Then
        Set 'Den-Ceiling Fan' On
        Run Program 'Den Ceiling Fan WSTOP' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

 

=============================================

Den Ceiling Fan WSTOP - [ID 011D][Parent 011B]

If
        Control '_Den Fireplace Fan RUNNING' is switched Off
 
Then
        Wait  10 minutes 
        Set 'Den-Ceiling Fan' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

Link to comment
2 hours ago, jgcharlotte said:

Excellent, thanks!

 

Just for interest sake....here is another programming trick to incorporate the two programs into one. (makes vocals easier sometimes, but may make it complex to figure out a year from now)

Den Ceiling Fan WRUN - [ID 011C][Parent 011B]

If
        Control '_Den Fireplace Fan RUNNING' is switched On
    AND
        Control '_Den Fireplace Fan RUNNING' is NOT switched Off     <------NOT makes Else run when 'switched Off'  becomes True
 
Then
        Set 'Den-Ceiling Fan' On
 
Else
        Wait  10 minutes 
        Set 'Den-Ceiling Fan' Off


 

AND Logic explanation
If - 'is switched On' is true then 'is Not switched Off' must also be True = both can never happen at the same time
If - 'is NOT switched Off' is False then 'is switched On' must also be False = both can never happen at the same time

 

 

Have fun!!

Edited by larryllix
Link to comment
1 hour ago, jgcharlotte said:

I'll have to give it a try.  I knew there must be a way to do it in one program!

 

If you are using a logic element that has a Status then only one If logic line is needed, as On will run True, and Off will run Else.
On a SwitchLinc, control switched On/Off is from the paddle presses, and status is from the bulb dimmer position.
rograms watching control/switched watch paddle operations only, while status watches for anything that modifies the dimmer position.

OK. no nightmares....K? :)

  • Like 1
Link to comment
1 hour ago, larryllix said:

If you are using a logic element that has a Status then only one If logic line is needed, as On will run True, and Off will run Else.
On a SwitchLinc, control switched On/Off is from the paddle presses, and status is from the bulb dimmer position.
rograms watching control/switched watch paddle operations only, while status watches for anything that modifies the dimmer position.

OK. no nightmares....K? :)

Another example:

When Status is used in the ‘If’, a button on a hand remote (linked to that device) can cause the Status of that device to change, this would ‘also’ be detected as would a press on that device’s paddle.

You would therefore be able to detect a ‘hand remote’ button event and/or a ‘device paddle’ press event with one program.

 

 

Edited by LarryM
  • Like 2
Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...