![]() |
|
Safe Programming of loops - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Support (https://www.comfortforums.com/forum-2.html) +--- Forum: Questions on Programming Comfort (https://www.comfortforums.com/forum-83.html) +--- Thread: Safe Programming of loops (/thread-4249.html) |
- Daylehouse - 07-12-2015 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 - slychiu - 07-12-2015 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 |