Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Safe Programming of loops
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Sunday Jul 12th, 2015 02:10 pm
   PM  Quote  Reply 
1st Post
Daylehouse
Member
 

Joined: Thursday Jun 1st, 2006
Location:  
Posts: 17
Status: 
Offline

  back to top

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



 Posted: Sunday Jul 12th, 2015 04:34 pm
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5502
Status: 
Offline

  back to top

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






 Current time is 08:07 am
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems