Jump to content

Using Wait command. Will this work?


binaryman

Recommended Posts

Posted

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)

Posted

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!

Posted

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)

Posted

I tend to agree with MWareman.  One thing that could make it work would be to disable the program, then trigger it externally when you want it to start.  Disabling the program will avoid having the program trigger itself upon temperature changes.

Posted

It should do, yes. As mentioned, the original one should also work if disabled. That prevents the If condition causing a cancel and reevaluate while the wait is processing.

Posted

I hope you realise that ISY is an event triggered processing engine.

 

You do not need to constantly cycle through testing the temperature. Every time the temperature reading changes, your program will be invoked, triggered and the appropriate Then or Else run, by itself.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

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

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...