pauldugas Posted September 7, 2017 Posted September 7, 2017 I have a line in the THEN clause of a program that runs another program's IF/THEN/ELSE but that other program is disabled. The Last-Run time for the second program is updated when the first one runs but it's not actually running the program. Is that the expected behavior? I disable the second program so it would not be scheduled to run on it's own but I assumed that I could still explicitly run it from other programs. Guess that's not the way it works.
oberkc Posted September 7, 2017 Posted September 7, 2017 Disabled programs will not self-initiate, but can be called from other programs. If yours is not running when called, I would look into potential programmatic concerns.
JBanaszak Posted September 7, 2017 Posted September 7, 2017 Disabled programs will not self-initiate, but can be called from other programs. If yours is not running when called, I would look into potential programmatic concerns. I have seen and copied from other examples here a statement that "enables" the program before calling the then/else statement. Is this step not required? Sent from my iPhone using Tapatalk
paulbates Posted September 7, 2017 Posted September 7, 2017 Correct, it's as oberkc described. Disabled only means the if logic won't run on its own. The if logic will work on a disabled program if you 'run if' from another program. I have a number of programs that I use as subroutines... disabled but work when called from other programs Paul Sent from my iPhone using Tapatalk 1
pauldugas Posted September 7, 2017 Author Posted September 7, 2017 I'm pretty sure this used to work. Will investigate and test more thoroughly. Thanks for the sanity check, Paul
pauldugas Posted September 7, 2017 Author Posted September 7, 2017 (edited) I have a number of programs that I use as subroutines... disabled but work when called from other programs Can you confirm that when calling the disabled programs, you are running the IF and not just the THEN or ELSE? Edited September 7, 2017 by pauldugas
larryllix Posted September 7, 2017 Posted September 7, 2017 (edited) Can you confirm that when calling the disabled programs, you are running the IF and not just the THEN or ELSE? When you call another program you specify which section (If, Then, or Else) you want to run, whether disabled or not. "Disable" only disables the triggers in the program, in the If section. Everything else works per normal. Edited September 7, 2017 by larryllix
stusviews Posted September 7, 2017 Posted September 7, 2017 (edited) If the trigger statements include Status, then running IF won't work unless the state of the device changes at the instant Run is initiated. Calling THEN or ELSE is not affected by this restriction. Hmm, I don't believe CONTROL will work either. It's best to "paste" your errant program in it's entirety. Include the calling program, too. Edited September 7, 2017 by stusviews
oberkc Posted September 8, 2017 Posted September 8, 2017 If the trigger statements include Status, then running IF won't work unless the state of the device changes at the instant Run is initiated. Are you certain about this. I believe STATUS conditions will be fine. CONTROL conditions will most likely evaluate false (unless, as you say, it is triggered simultaneously, if possible even.)
larryllix Posted September 8, 2017 Posted September 8, 2017 Are you certain about this. I believe STATUS conditions will be fine. CONTROL conditions will most likely evaluate false (unless, as you say, it is triggered simultaneously, if possible even.) I agree. Seems to be a typo. Status should work as a simple logic filter (no triggers) and control / switched works as well but control / switched will always be False and always run Else (depending if any other OR logic doesn't override)
oberkc Posted September 9, 2017 Posted September 9, 2017 I have seen and copied from other examples here a statement that "enables" the program before calling the then/else statement. Is this step not required? Sent from my iPhone using Tapatalk No. Not necessary. 1
stusviews Posted September 9, 2017 Posted September 9, 2017 I do have a situation where I needed to disable and re-enable a program. Our driveway gate sends a notification when the gate opens and then again when it closes 30 sec later (using the built-in relay and an I/O Linc). So I disable the sending program for 40 sec after the notification is sent. 1
Recommended Posts