Jump to content

Program Loop


sfhutchi

Recommended Posts

Posted

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.

Posted

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')

Posted

I think you looking for the 'Repeat' action. This repeats all actions following it, or up to the next Repeat. You can either repeat a specified number of times, or repeat indefinitely on an interval.

Posted

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.

Posted

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).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...