Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Safe Programming of loops
#1
I wondered if anyone can help with programming a loop in Comfort that is safe and will not overload the Bus.

Here is the application, I have CBus with a DMX gateway controlling RGB LEDs. If I wanted to create a looped response that created a rainbow or flashing what would be a safe way to do this in Comforts programming?

Can you do a \'loop until\' or call the response from the same response with maybe a flag to check each time if the loop should continue?

Any advice on a safe method?

Dayle
Reply
#2
Use a timer as in the following example to continuously call itself after a delay

Response X:
Cbus actions...
other actions
...
...
Do Response X after 2 seconds using Timer N

This will do the Response X every 2 seconds

To stop this cycle trigger a Response to stop the timer

eg
Stop Timer N

This stops the timer and hence the Response will not be triggered




Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)