JP Posted October 1, 2010 Posted October 1, 2010 Would you please consider adding a test for a program’s "activity" (not idle) to allow other programs to determine if a long running program is executing. Knowing which branch (Then/Else) is executing would be nice but I'd be happy with just knowing that it is not idle. Two reasons for the request, the first is simple, I just don't want certain programs to run if other ones are running to avoid conflicts. I can’t base it on “status†because the Else branch will show false but the program is currently executing. The second reason is the use of programs as “variablesâ€, this would allow for an additional state besides the existing two (True/False) and might make some programs a little easier to read (I think easier timing delays). It also allows these “state†programs to actually do something besides just being a state variable. While any future adding of “variables†to the product might moot part of this, the first reason would still need this. Thanks, JP
Michel Kohanim Posted October 3, 2010 Posted October 3, 2010 Hello JP, This makes sense. As a workaround, you can split your programs and test for the "true" condition (it's running Then). With kind regards, Michel
Goose66 Posted October 3, 2010 Posted October 3, 2010 Well, even if you split your programs, the status of a program will still show true even after the Then branch is complete. The status of the program remains True until the Else branch of the program is run. So there are two workarounds. If you use Else branches in your programs, create two status programs: 'ProgramThenRunning' and 'ProgramElseRunning'. At the beginning of the Then branch, set the 'ProgramThenRunning' status to True (run the Then branch) and at the end of the Then branch, set the status of the 'ProgramThenRunning' to False (run the Else branch). Same setup with the 'ProgramElseRunning' staus in the Else branch. However, the programming architecture of the ISY renders Else branches pretty useless, IMO. So if you just have Then branches, like I and, I would imagine, most others do, just place a "Run Program '' (Else Path)" at the end of the Then branch of your long running program. That way, the program status will only be true when the program is running (the Then branch, which is the only branch with code).
JP Posted October 5, 2010 Author Posted October 5, 2010 I understand your comments as I have some programs where I just run a Then Path and Else Path to manipulate status. I guess where I'm a little different is that I have some long running Else branches. If you have followed some of my prior posts, I have a very dirty environment (electrically) and for simple "from" / "to" If statements, I may run 10 to 20 minutes looping through "on" (then) and "off" (Else) commands as appropriate. Yes, I could break up these into individuals programs (and have on some of them) but adding a simple extra test of an value that appears to already exist would help decrease small programs and make the overall schedule easier to read (not everything has to be a work around). Anyway, just a suggestion....... JP
JP Posted October 9, 2010 Author Posted October 9, 2010 BTW, one of the problems with using Else Path at the end of a Then branch (to change the state to not-running in this conversation) is that it doesn't work if you use a Repeat action. Once you start a repeat group, there's no way to add an action after the group (no End Repeat command) that is not part of the group (you can before but not after), at least that I've found. You could add a Then Path at the start of the repeat group and an Else Path at the end but that is really getting tacky as a work around. I'll leave my suggestion/request for consideration.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.