Jump to content

KPL LED Off


jkraus

Recommended Posts

Posted

I may be having a couple issues to debug, but let me simply ask. Should the program below turn the KPL LED off (ie program is off) after it finishes, that is after 1 hour?

 

If

Control 'KPL Pool Eq B' is switched On

 

Then

Send X10 'K16/On (3)'

Wait 1 hour

Send X10 'K16/Off (11)'

 

Else

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

Posted
I may be having a couple issues to debug, but let me simply ask. Should the program below turn the KPL LED off (ie program is off) after it finishes, that is after 1 hour?

 

If
       Control 'KPL Pool Eq B' is switched On

Then
       Send X10 'K16/On (3)'
       Wait  1 hour 
       Send X10 'K16/Off (11)'

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

 

Yes, that should work unless Control 'KPL Pool Eq B' is switched which will either restart the program or quit it if the button is switched any way but On. So if you switch KPL Pool Eq B Off the program will end before the Wait is over.

 

If you find that is the case you could watch for the Off.

 

If
       Control 'KPL Pool Eq B' is switched On
   And Control 'KPL Pool Eq B' is not switched Off

Then
       Send X10 'K16/On (3)'
       Wait  1 hour 
       Send X10 'K16/Off (11)'

Else        
       Send X10 'K16/Off (11)'

 

Rand

Posted

Thanks Sub-Routine

 

As you describe it is exactly how I want it to work However, after the 1 hr the light on the KPL was still on (like the program was still active), but like I said I am having a few other things to debug so it may not be related. I just wanted to make sure I was not missing something obvious, like I needed to add something like "stop program after the 1hr" which of course did not make sense to me as the program would be over after 1 hr, just wanted to make sure

 

I must have some other issue

 

Thx

 

Joe

Posted

After thinking further (as your program works fine) could you explain in more detail

why you include the "And" line and the "Else" line. It should be simple but not totally clear to me

 

 

If

Control 'KPL Pool Eq B' is switched On

And Control 'KPL Pool Eq B' is not switched Off

 

Then

Send X10 'K16/On (3)'

Wait 1 hour

Send X10 'K16/Off (11)'

 

Else

Send X10 'K16/Off (11)'

Posted

Hi Joe,

 

The And line watches for the KPL button to be turned Off. When the button is turned Off the program will become False and the Else is executed.

 

Rand

Posted

Thanks!

 

Supose this KPL button was one of 4 buttons with similar programs (just different wait time) and they were all Mutually exclusive. If the first button was pressed ON and the second button was then pressed on, would the first program in button A stop?

Posted
Thanks!

 

Supose this KPL button was one of 4 buttons with similar programs (just different wait time) and they were all Mutually exclusive. If the first button was pressed ON and the second button was then pressed on, would the first program in button A stop?

 

No. The KPL will only send button B On and not a button A Off. You could write that into your program though. In your button B program add a line that says Stop program button A.

 

Rand

Posted

Great, thanks! Implemented your suggestions and works great. Man, I keep learning the programming, but see the advantage of using the "Run Else" and your other suggestion.

 

All is OK now, again, thanks

 

Joe

Guest
This topic is now closed to further replies.

  • Recently Browsing

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

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...