Jump to content
C4 Forums | Control4
  • 0

Question

Posted

Hi guys wonder if you can help me,

We are integrating two moving head light units that are controlled over dmx. We have full control over the lights and have programmed the sequence to trigger in order. 

once the sequence has ended we want it to repeat until the button on the keypad is pressed again and the 'return to dormant state' is then activated.

so far i have been able to trigger the event but it is constantly running in the back ground and has the potential to cause the cpu to crash.

kit we are using

eDiDio daly dmx gateway

14 answers to this question

Recommended Posts

  • 0
Posted

Hi and welcome.

A simple way would be to create a timer that is set to the duration of the programmed sequence and configured so that when it expires, it re-activates the sequence giving you your loop. Then, pair it with the keypad button in programming so that when it is disabled/off, it stops the timer and stops the lights at the end of the sequence.

If the motion is programmed outside of C4 via your DMX then i don't see how there will be any discernible additional load on the processor.


  • 0
Posted
44 minutes ago, Popolou said:

Hi and welcome.

A simple way would be to create a timer that is set to the duration of the programmed sequence and configured so that when it expires, it re-activates the sequence giving you your loop. Then, pair it with the keypad button in programming so that when it is disabled/off, it stops the timer and stops the lights at the end of the sequence.

If the motion is programmed outside of C4 via your DMX then i don't see how there will be any discernible additional load on the processor.

thanks for the reply,  i have added the timer to the sequence, 

set timer start before the sequence actions upon button press 

sequence lasts 34 seconds

set timer to 35 second interval

added 'if timer is expired' condition

added press custom button withing the if timer is expired subsection 

 

there seems to be something else i need to add as the sequence doesnt re trigger

 

appreciate all the help

 

  • 0
Posted

yes, thinking about it logically i want that unticked so the system manually re triggers

have now un ticked

still not re triggering though

ive set a seperate custom button to stop the timer 

 

  • 0
Posted
28 minutes ago, WAVGeorge said:

yes, thinking about it logically i want that unticked so the system manually re triggers

have now un ticked

still not re triggering though

ive set a seperate custom button to stop the timer 

 

Just saw your edit. Yes, but i think you wanted it to loop as per your "once the sequence has ended we want it to repeat until the button on the keypad is pressed again"? That requires the timer to repeat which will then trigger the sequence until you either press the keypad button again (to toggle it off). Or have i misunderstood what you are after?

Copy/paste your programming to take a look.

  • 0
Posted (edited)

Ok, so first thing i'd do is move that all into a macro. Then, in that same screen you posted (for the button), simply call the macro. On the programming tab, go to the timer menu, select "lighting Loop", make it repeat and on expiry, make it execute the same macro again. This gets you your looping function.

There are a few ways you can then disable/stop the macro. The quickest could be to add another step to the same macro so that "if Lighting Loop is running" you can stop it and it will stop once the sequence finishes. But there may be a moment when you press it inbetween the timer ending and starting so you can instead add a variable so that on every toggle of the button, it flips between a 1/0 or True/False and it breaks the sequence.

When you get the fundamental operation working, you can then fine tune the programming.

 

Edit
Just to add that at the top of the script, you need to add an If/Else statement so that if the timer is NOT running, start it. The rest of the programming goes under the Else part (and delete that next IF you currently have there). Without this, the timer will reset from the beginning every time the script starts which breaks it.

Edited by Popolou
  • 0
Posted

cool, ive now got the loop working

upon pressing my second custom button, includes 

condition if loop is running

                  -  stop timer

                  -  dormant all lights

 

sequence stops but after 10 seconds but restarts 

Screenshot 2024-11-14 132722.png

Screenshot 2024-11-14 132807.png

Screenshot 2024-11-14 132843.png

  • 0
Posted

Yes, because you have a second "Press the custom item "Moving heads preset..."" at the end of your programming in your first screenshot.

Also, you should only start the timer in one place: you currently have it on the button press and inside the macro.

  • 0
Posted

Thank you, appreciate I'm fairly new to programming, 

I have it working to the minimum standard thanks to you so appreciate your help massively! 

Cheers George

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.