Jump to content

Program Loop


sfhutchi

Recommended Posts

Before I crash my device... Can I call the same program at the end of a current program to get it to loop? Or is there a way to get it to loop for a period of time?

 

The reason that I ask is because I was thinking about making a program with a lighting sequence for a Halloween Display. I don't need anything as fancy as Light Show Master.

Link to comment

Okay.. Took a chance and did a quick test.

 

It doesn't seem that a program allows you to call itself at the end.

Any ideas?

 

Here is what I put, but it only runs once and then stops.

 

 

 

If

From 6:00:00PM

To 11:00:00PM (same day)

 

Then

Set 'Hall Light Near Dining' On

Wait 3 seconds

Set 'Dining Room Chandelier' 40%

Wait 2 seconds

Set 'Dining Room Recessed Lighting' 60%

Wait 5 seconds

Set 'Front Hall Light' Off

Wait 3 seconds

Set 'Dining Room Recessed Lighting' 20%

Wait 2 seconds

Set 'Dining Room Chandelier' 80%

Wait 2 seconds

Set 'Hall Light Near Dining' Off

Wait 2 seconds

Set 'Dining Room Recessed Lighting' Off

Wait 2 seconds

Set 'Dining Room Chandelier' Off

Run program 'Test Program'

 

Else

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

Link to comment

Exactly what I needed. Thanks Chris.

I guess I have skimmed over the 'repeat' function all this time.

It works perfectly!!

 

At first I mistakenly put it at the end, but then was VERY impressed with how as I moved it up the list in the program, that it automatically indented the following lines to make it clear which portion would be repeated.

 

Is there any way to have just a section in the middle repeat? I don't need it in this case, but am curious.

Link to comment

Theres no "official" 'End Repeat' entry, but there is a way to do it.

 

'Repeat' repeats everything to the end of the list, or to the next 'Repeat' statement. Therefore, just put 'Repeat 1 time' at the end of your loop. This essentially runs the remaining actions one time (or up to the next Repeat if you have another one).

Link to comment

Archived

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


×
×
  • Create New...