Jump to content

Simple evening kitchen light program


Go to solution Solved by apostolakisl,

Recommended Posts

Posted
16 minutes ago, MrBill said:

 

That's true, I don't really either.  I do know too many State Variables with 994 hardware you will reach a point of queue overflows errors and a sluggish half operating system.  In the case of the two programs that run sequentially, without extra pointless enables/disables my guess is that it's more efficient... and it's certainly easier code to read.

If I were to wager a guess, I would say enabling/disabling a program uses less resources than running a program, even a simple one.  There is nothing to test, no logic to process, you're just setting a flag that says "ignore program".   I'm pretty sure you could fill all of ISY's memory up with disabled programs and it wouldn't slow anything down, but I can't say for certain.  Personally, I don't really see that either program format is better or worse than the other from a readability standpoint.  The enable/disable style doesn't require any knowledge of ISY triggering rules which to an ISY newbie might make it easier.  One minor flaw in the disable style is that if power goes off while one is disabled (after the lights have been turned on) and then restored after 11pm, the next day it will run the previous day's program again.  Which if it just happened on the exact day in the spring or fall that you crossed that threshold time, your light would turn on at a very slightly wrong time.  Unlikely to happen and even more importantly, wouldn't matter if it did in this application.

 

Posted
1 hour ago, MrBill said:

So it is possible to conceptualize "away" and then use an empty program to determine it's status...

Yes.  I have a couple of empty programs I use as a binary state indicator 

Posted (edited)
34 minutes ago, oberkc said:

Yes.  I have a couple of empty programs I use as a binary state indicator 

I do something very similar with Elk outputs.  Turn unused outputs on/off as "flags" or "binary variable" or "true/false state" "Boolean" logic or whatever you want to call them.  I can't say I have ever done a blank program in ISY, but I do have a number with blank then/else clauses.  For example, I have a program called "dark outside" that runs true at sunset and false at sunrise.  You could have a blank "if" as well and use other programs to trigger a "run then"/"run else" to set the state, but I would just put whatever logic the other program was using directly into the "if" section.  But perhaps you might have a system of organization where you wanted to keep the logic separate from the flag.

EDIT:  Also do it with unused outputs on my CAI webctontrol boards.

Edited by apostolakisl
Guest
This topic is now closed to further replies.

×
×
  • Create New...