Jump to content

If <Program> is Running If (or Running Else)


paulbates

Recommended Posts

I know that there is ISY program  logic to see if a program's conditions are true or not.

I have a couple of cases where it would be good to know if a program was currently executing its If or Else

If Program 'test' is  Running If
                                  Running Else
                                  True
                                  False

I know this can be done with variables and is a low priority request. But would be appreciated as feature to save variables and make code cleaner.

Paul

Link to comment
32 minutes ago, paulbates said:

I know that there is ISY program  logic to see if a program's conditions are true or not.

I have a couple of cases where it would be good to know if a program was currently executing its If or Else

If Program 'test' is  Running If
                                  Running Else
                                  True
                                  False

I know this can be done with variables and is a low priority request. But would be appreciated as feature to save variables and make code cleaner.

Paul

There is a Program Ran + XXX Time. Would that not work if set to 0? Maybe the trigger would only be an edge style though and not remain True. I haven't found a usage for that yet and always figured it was an old and primitive  construct now replaced by calling programs from programs and Waits.

That idea may be good with a time frame option, so we could detect the program has run or running in the last X time, as per above difference.

Program Ran <= 2 minutes ago would remain True for two minutes past completion of Program.

Program Ran <=  0 seconds ago (= program running now) may work for the OP suggestion too.

Great for Watchdog programs!!

Link to comment
1 hour ago, paulbates said:

Thanks Larry.. not familiar with that one. Poked around the wiki and the Admin Console and can't find it in the ISY programming langauge

Paul

I don't remember it working exactly this way, having a range,  (see Belize? leak system) and you may need to discount my ramblings above but....

Now you would have to add the test for program True, False and it would be two lines. Your idea above would integrate them and get around some of the logic fallout of having two lines.

Paul's Program test.jpg

Link to comment
36 minutes ago, paulbates said:

Larry's suggestion works great. The feature would be nice, but at the lowest priority vs other things being worked on.

Thanks Larry

I never thought about it to try at the time but....

I wonder if
  From  1 hour  Before  Last Run   Paul's program 
  To   1 hour   After   ISY can foresee the future

would work? :)

Link to comment

Archived

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


×
×
  • Create New...