Jump to content
C4 Forums | Control4
  • 0

Loop of scenes


Meffx

Question

Hello. I want to trigger multiple lighting scenes that repeat in a loop, but I dont know how to turn it off since the loop runs indefinitely. Disabling the scenes or using a “stop” command hasn’t been effective. Do you have any ideas on how to resolve this?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • 0

To start, stop using loops. Don't take this the wrong way - but if you can't solve this on your own you should pretend that option does not exist. Like i said, don't take it the wrong way or take it personal. 90% of dealers should stay away from them.

Loops (while statements) in Composer are easy to use wrong without advanced understanding on how director handles commands, and thus can easily lead to system freezes, to the point that a factory restore may be the only option.

Use a repeating timer for a much 'safer' loop option.

 

Now, answer RAV on how you're trying to use it in the first place, and more-so his why question

Link to comment
Share on other sites

  • 0

Definitely don't take the don't use loops suggestion personally.  I used to tell all of my dealers to not use them for exactly the reasons Cyknight mentioned, guys who have been programming for years and years.  That said, to try to address your issue without knowing all the details it seems like you're going to need to incorporate a variable you control in some way they use the change in that variable to kill your loop.  But like Cy said again, be very careful.  It's not fun to accidentally send director down an infinite loop crash and try to have a handful of seconds after a reboot to try to log in and fix it before it crashes again.  

Link to comment
Share on other sites

  • 0

Ok, thank you very much for the suggestions. I understand that an infinite loop can crash the processor.

In general, I'm working on a project where the client would like to have the ability to simulate an external wave in a five-story building. The only option that came to my mind is to create specific lighting scenes and trigger them in a loop with certain time intervals.

Link to comment
Share on other sites

  • 0

I have never used the flashing light option in advanced lighting scenes but if you can change the length of each flash then you could create this effect by turning the lights on x seconds apart with a flash time of y on each light.  This is how the pool companies tend to set up colour swimming in a pool. 

Link to comment
Share on other sites

  • 0

Variable loopit, number
Variable maxruns, number
Timer Wave

Wave Timer starts
If loopit = 0
—cancel timer
—stop
If loopit = 1 scene1
If loopit = 2 scene2
etc

Timer expires
Maxruns +1
If maxruns =y
—stop
Loopit +1
If loopit =x set loopit =1 (x is 1 more than total scenes needed so restarts wave sequence)
Restart timer

Button
If loopit >0
—set loopit = 0
—cancel wave timer
—scene lights default
—stop
Set loopit = 1
Start wave timer

When project loads (extra caution)
Set loopit =0

Edited by RAV
Added maxruns
Link to comment
Share on other sites

  • 0

The wave itself might be possible within the actual lighting scenes, using multiple actions to simplify this (will depend on lighting devices used) where you literally just run a timer repeating and trigger the scene every time the timer expires.

Advanced lighting scenes allow you to add actions, so you an turn top and middle lights off and bottom on first action, delay a second, 2nd action turn bottom and middle on, top off, 3rd action bottom and top off, middle on - etc etc

 

Your programming would simply be:

 

WHEN {whatever your chosen trigger is}
Start timer 'wave'


WHEN {timer wave} expires
activate lighting scene

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this 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
Answer this question...

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.