Jump to content

Will a long-running program be stopped by a program change.


Recommended Posts

Posted

I have a program that turns on the water in my birdbath for 10 seconds, hourly. 

 

Daily Bird Bath Auto-fill

 

If

        Time is 6:00:00AM

 Then

        Repeat 13 times

           Send X10 'J2/On (3)'

           Wait 10 seconds

           Send X10 'J2/Off (11)'

           Wait 59 minutes and 49 seconds

 Else

        Send X10 'J2/On (3)'

        Wait 10 seconds

        Send X10 'J2/Off (11)'

 

If I make a change to that program during the 13 hour cycle, will that cycle be interrupted?

 

Thanks,

JLOB

 

 

 

Posted

I have a program that turns on the water in my birdbath for 10 seconds, hourly. 

 

Daily Bird Bath Auto-fill

 

If

        Time is 6:00:00AM

 Then

        Repeat 13 times

           Send X10 'J2/On (3)'

           Wait 10 seconds

           Send X10 'J2/Off (11)'

           Wait 59 minutes and 49 seconds

 Else

        Send X10 'J2/On (3)'

        Wait 10 seconds

        Send X10 'J2/Off (11)'

 

If I make a change to that program during the 13 hour cycle, will that cycle be interrupted?

 

Thanks,

JLOB.

 

Whatever is in the "then" clause at 6:00 is what will be executed. If you make changes in the "then" clause the program could be interrupted and will start again at the next 6:00 am cycle unless you manually run the "then" clause after you make changes.  What change did you want to make?

Posted

Whatever is in the "then" clause at 6:00 is what will be executed. If you make changes in the "then" clause the program could be interrupted and will start again at the next 6:00 am cycle unless you manually run the "then" clause after you make changes.  What change did you want to make?

Actually I just wanted to change the start time.  Guess it'll be ok.  Thanks.

J.

  • 2 weeks later...
Posted

What is the purpose of the "else" clause?  Perhaps you have a different program that calls the else clause of this program, but as it sits here, the else clause has no trigger.

Bingo.  Another program triggers the water for a one-time 10 seconds.

JLOB

Posted

What is the purpose of the "else" clause?  Perhaps you have a different program that calls the else clause of this program, but as it sits here, the else clause has no trigger.

I don't understand this. If the time is not 6am, the else clause should be executed. But it sounds like this is not the case.

Posted

I don't understand this. If the time is not 6am, the else clause should be executed. But it sounds like this is not the case.

At 6 am the "then" clause runs.

 

The following will run the else clause at 6am

 

If

        Time is not 6:00:00AM

Posted

I don't understand this. If the time is not 6am, the else clause should be executed. But it sounds like this is not the case.

 

That's because your original statement indicates what to do when it's 6 am. It doesn't state what to do if the time is not 6 am. Nothing is assumed. That's why apostolakisl's suggestion needs to be added.

Archived

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

×
×
  • Create New...