Jump to content

Using Wait command. Will this work?


binaryman

Recommended Posts

My goal for this program is to loop through it until stopped by another program.  If the hot tub temperature is greater than a set amount, then wait 5 minutes and check again.  Do this anytime the temperature is greater than that amount (or equal to).  As soon as it dips below, then to turn the heater on for 10 minutes and check again.  Will this program do it or am I missing something?  I just get confused when it comes to the wait command at times :-P

 

My program is named 'Hot Tub in use' and looks roughly like:

 

If:

Status 'thermostat hot tub' >= 103 (temperature)

 

Then:

wait 5 minutes

run program 'Hot Tub in use' (if)

 

Else:

set 'hot tub relay' on

wait 10 minutes

set 'hot tub relay' off

run program 'Hot Tub in use' (if)

Link to comment

Maybe, but probably not.

 

When the temp changes to 99, else will run, turn on the heater and begin the wait.

When the temp hits 100, the wait will cancel, the if reevaluate and the else will restart.

This will continue until the temp hits 103, when a 5 min wait will start.

When 104 hits, the wait will cancel, and the then restart.

Etc....

 

You'll have very hot water!

Link to comment

Ahh makes sense.... so now I have this... THIS should work... right? (both programs are disabled programs by the way.  'Hot Tub in use' gets it's 'then' statement executed manually by another program upon control activation of a keypadlinc button, and program stopped the same way)

 

----------------

'Hot Tub in use' 

 

If:

 

Then:

wait 5 minutes

run program 'Hot Tub in use sub' (if)

 

Else:

set 'hot tub relay' on

wait 10 minutes

set 'hot tub relay' off

run program 'Hot Tub in use sub' (if)

----------------

'Hot Tub in use sub' 

 

If:

Status 'thermostat hot tub' >= 103 (temperature)

 

Then:

run program 'Hot Tub in use' (if)

 

Else:

run program 'Hot Tub in use' (then)

Link to comment

Archived

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


×
×
  • Create New...