Jump to content

Newbie: How can a "Disabled" program also be &quo


porscheguy

Recommended Posts

Posted

I'm a little confused about the definition of Status as far as a Program or Folder is concerned. What does it mean that the Status of a Program or Folder is True even though it is Disabled (in the Program Summary tab)?

 

I know I can set either of those to Enabled or Disabled but how do I set a Program or Folder True or False or what determines whether it is True or False?

 

A Condition can test whether a Program or Folder is True or False - it doesn't test for Disabled or Enabled.

 

Please elaborate.

 

Thanks -

Posted

Folders only obey their own Conditions, they cannot be enabled/disabled or made True/False using programs.

 

Disabled programs, as oberkc wrote, can be Run (If), Run Then, Run Else.

 

Disabling a program is only advantageous when there are Conditions in the program. You may wish to Disable/Enable certain programs when guests are present, for example.

 

Disabled programs may be used to cascade programs. If, Then, If, Then... programming.

 

Rand

Posted

(By the way I can't get the original subject to read right - the last word is supposed to be "True"? and I can't seem to correct it.)

 

Enabled and Disabled seem to be more or less what I thought. But I don't follow what True and False mean. Here is my first scenario.

 

I have a Program Folder that that has 5 pool equipment programs. The Program Folder is named PoolEquipment and I put a condition on the folder that if PoolEquipment is True Then the programs in the folder are allowed to run. I took True to mean here that the PoolEquipment folder was enabled. This is what I wanted: if I disable the PoolEquipment folder then none of the programs in the folder (including schedules) would execute.

 

If this is wrong, how do I create a flag or virtual button in the ISY that I can togle to allow or disallow a folder of programs?

 

Still confused on True and False as it relates to Folders and also Programs.

 

Is there documentation on this somewhere I've missed?

Posted
But I don't follow what True and False mean. Here is my first scenario.

 

True or false is simply the result of the last evaluation. If a program was last evaluated three days ago, and it evaluated true (and ran the "then" path), then that program is currently true, and will remain so until it is evaluated again.

 

The Program Folder is named PoolEquipment and I put a condition on the folder that if PoolEquipment is True Then the programs in the folder are allowed to run. I took True to mean here that the PoolEquipment folder was enabled. This is what I wanted: if I disable the PoolEquipment folder then none of the programs in the folder (including schedules) would execute.

This all sounds correct to me. One subtlety, programs can be called externally, by other programs, even if disabled. So....while the programs in your folder will not run by themselves if the folder condition is false, they can still be called by other program statements, such as run (if), run (then), or run (else).

Posted

Thanks oberkc.

 

True or false is simply the result of the last evaluation. If a program was last evaluated three days ago, and it evaluated true (and ran the "then" path), then that program is currently true, and will remain so until it is evaluated again.

 

OK so it is a "vestige" of the last time it ran? I won't belabor this much more, and will instead learn from trial and error, but I have a lot of programming experience (experience, but not an expert) in everything from machine code, assembly language, fortran, basic, c, c++ and some exotic object oriented languages and to me true and false are usually the result of evaluating a boolean expression, a representation that a routine completed successfully or an arbitrary designation of a "state" of some type. The present case seems to fall into that last category: So if a Program's last execution was in a Then clause it is True, but if it's last execution was in an Else clause it is False. If this is the case, I'm not quite sure yet why that is useful - knowing what type of clause it was last executed in - but maybe in time I will see it's usefulness.

 

 

 

This all sounds correct to me. One subtlety, programs can be called externally, by other programs, even if disabled. So....while the programs in your folder will not run by themselves if the folder condition is false, they can still be called by other program statements, such as run (if), run (then), or run (else).

 

This refers to my Folder example and I do understand the aspect about programs in the folder being run by other programs independent of the Folder status. So when the Folder condition is evaluated, the True or False aspect does represent whether the Folder has or has not been disabled? In this case it is simply a flag on the folder that means these programs won't run on their own? It has nothing to do with whether any of the programs within the Folder have been run recently nor is it some complicated correlation of the True or False states of any of the contained Programs?

 

Thanks again - I'm going to give this a rest and go to trial and error. It just would be nice if some overview of the code methodology were available. Maybe the information is somewhere in the Forum Posts.

 

Thanks again -

Posted
So if a Program's last execution was in a Then clause it is True, but if it's last execution was in an Else clause it is False. If this is the case, I'm not quite sure yet why that is useful - knowing what type of clause it was last executed in - but maybe in time I will see it's usefulness.

 

This architecture allows a program to function as a binary variable, since the persistent true/false state can be used to trigger, permit or constrain other programs without having to leave programs looping through some make-busy task waiting for conditions to change.

 

If you prefer, you can also choose to make the True/False state a momentary condition. Simply append

 

       Run Program '[same program]' (Else Path)

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

 

to the end of your program. If you do that, so long as the Then statement is executing/waiting/repeating it will display as True on the Program Summary page, then as it finishes its state will return to False.

Posted

The above answers are very good, but may be a bit more complex of a response then a "newbie" is looking for. Here is how I think of it.

 

1) A program is true if the last thing it did was run the "then"

2) A program is false if the last thing it did was run the "else"

3) Disabling a program only disables it from spontaneously running (self triggering). In other words, another program can force the "if", "then", or "else" to execute, but it won't do it on its own.

-for example, "if status light xyz is on" triggers every time light xyz is changed and runs "then" if light is on or "else" if it is not (and becomes true or false respectively). If the program is disabled, the program will not trigger if you control the light, it just sits there. However, another program can force it to run the program as usual by stating "run program blah blah blah (if)" or another program can jump ahead and force the "then" or "else" clause to run without regard for what is written in the "if".

 

Hope I didn't make it too confusing again.

Posted
The above answers are very good, but may be a bit more complex of a response then a "newbie" is looking for.

 

Anyone who uses the word "vestige" can handle all the complexity I am capable of providing. :)

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...