Jump to content

Program question when it comes to Wait commands.


toddhutch

Recommended Posts

This is in 5.0.11b.

 

forscap.jpg

 

I stand corrected.

 

I assume it is identical to what I did, however, which would explain why I never noticed it.  

Though you would need to confirm this, I assume it is two triggers independent of any sort of internal "waiting".  In other words, when it compiles something like

 

From 1pm

for 1 hour

 

It compiles to two triggers, 1pm and 2pm making it independent of a reboot.  If not, then I would not use that when I could use

 

From 1 pm

To 2pm

 

which is for sure two triggers.

Link to comment

I just tested it.

 

It is two triggers.

 

I did 

 

from 12:10:00

for 15 seconds

 

Then

set variable 1

Else 

set variable 2

 

And it first set the variable to 1, then 15 seconds later it set it to two.  The program summary page alos listed the program as having completed at 12:10:00 with a true stats, and had a next run time of 12:10:15 during the interval.  After 12:10:15 it showed the status as being false with the next run time of tomorrow at 12:10:00

 

So it is identical to

 

From 12:10:00

To 12:10:15

 

Not sure what the point is of having both.

Link to comment

I just tested it.

 

It is two triggers.

 

I did 

 

from 12:10:00

for 15 seconds

 

Then

set variable 1

Else 

set variable 2

 

And it first set the variable to 1, then 15 seconds later it set it to two.  The program summary page alos listed the program as having completed at 12:10:00 with a true stats, and had a next run time of 12:10:15 during the interval.  After 12:10:15 it showed the status as being false with the next run time of tomorrow at 12:10:00

 

So it is identical to

 

From 12:10:00

To 12:10:15

 

Not sure what the point is of having both.

 

I'd be curious if you could interact with it differently from another program.  Can you stop it and have the Else skipped?  Are there new types of actions available for the Then/Else sections that are not available under From:To?

 

Does Else execute with a reboot between?

Link to comment
Not sure what the point is of having both.​

 

Neither am I.  I assume it was one of those requests that folks make from time-to-time that some believe makes things more intuitive or otherwise easier.  

 

Otherwise, I am having trouble seeing what I could accomplish now that I could not accomplish before the presence of this construct.

Link to comment

I'd be curious if you could interact with it differently from another program.  Can you stop it and have the Else skipped?  Are there new types of actions available for the Then/Else sections that are not available under From:To?

 

Does Else execute with a reboot between?

No, you can't stop it (either one).  While I did not actually try it, the program lists as "idle" during the interval with a "next run time" 15 seconds (in this example) after the original run time.  A stop command issued to an idle program has no affect.

 

I also did not test a reboot, but per ISY operations, all programs are evaluated at boot, true/false status is set (when possible), programs that fall into the "catchup" time frame trigger, and next run time set (when possible).  I don't see any reason why it would not apply here the same.  Meaning that a reboot during the interval should still trigger the else clause at the end of the "for" period.

Link to comment

I'd be curious if you could interact with it differently from another program.  Can you stop it and have the Else skipped?  Are there new types of actions available for the Then/Else sections that are not available under From:To?

 

Does Else execute with a reboot between?

 

Actually, I assume one CAN stop either (then or else) by disabling the program.

Link to comment

Actually, I assume one CAN stop either (then or else) by disabling the program.

STOP

DISABLE

 

Two different commands.

 

Stop ends a repeat/wait without affecting the programs next trigger event

Disable blocks an "if" clause from self triggering (and also causes a "Stop")

 

In the context of common English, there could be some confusion, but in the context of ISY, different things.

Link to comment

STOP

DISABLE

 

Two different commands.

 

Stop ends a repeat/wait without affecting the programs next trigger event

Disable blocks an "if" clause from self triggering (and also causes a "Stop")

 

In the context of common English, there could be some confusion, but in the context of ISY, different things.

 

Yes, I meant Stop.  Disable prevents both from executing on their own, but you can't stop a from/to to cancel the else.  I was interpreting "For" as being active for the duration.  This may only make sense for linguistic convention on short intervals where time is more on a "stop watch" scale than a "wall clock" scale.

Link to comment

Actually, I assume one CAN stop either (then or else) by disabling the program.

 

I was not referring to the stop "command".  I understood that there was a question about how to stop (generic term) execution of THEN or ELSE clauses of a 'time from...for' condition.  I was trying to propose that one can disable a program around the time when the else clause would normally trigger and that would, effectively, stop the else clause from happening.  Equally, one could disable the program at the beginning time and prevent the THEN clause from happening.

 

For example:

 

if

time is from 12:10:10

to 12:10:20

then

disable the test program

else

enable the test program

 

would have halted the ELSE clause of the test program.

Link to comment

Yes, I meant Stop.  Disable prevents both from executing on their own, but you can't stop a from/to to cancel the else.  I was interpreting "For" as being active for the duration.  This may only make sense for linguistic convention on short intervals where time is more on a "stop watch" scale than a "wall clock" scale.

No, "for" does not keep the programming running and available for a stop.  

 

As I mentioned, the program executes twice and is idle between.  While I did not actually do what you say, I don't see a "stop" command on a program that ISY lists as "idle" causing anything to happen.

Link to comment

"For" can be used to bypass the common error of forgetting to specify "Next Day." I don't know it that was the intent, but anything that minimizes a common programming error is good B)

Link to comment

"For" can be used to bypass the common error of forgetting to specify "Next Day." I don't know it that was the intent, but anything that minimizes a common programming error is good B)

 

Yes, that is true.

 

"for" terminology also allows you to change only the "from" time of a program if your intent is to still have it run the else clause at the same interval of time later.  So, it would be slightly easier to edit the program if that is your intent.

 

But, those two things are fairly insignificant in my book.

Link to comment

Archived

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


×
×
  • Create New...