byronomo Posted October 17, 2011 Share Posted October 17, 2011 Is there a way to do the following using Composer HE without creating a loop?Anytime a certain door (with C4 contact) is opened, flash a certain light on/off until the door is closed. Then return that light to the state that it was in before the door was opened.If so, any guidance would be appreciated.Thanks! Link to comment Share on other sites More sharing options...
CFUG Posted October 17, 2011 Share Posted October 17, 2011 Loop? I'm not aware of any "loop" command within CHE. Set-up a repeating timer. Watch the door and start the timer based on door state. Upon expiration of timer, re-evaluate door state and make a decision to stop timer and resume last known setting (use a variable to track light level, that is if variables works for you) or execute a Programming Control STOP.Your flash interval won't be exact as the processor has to prioritize operations but I've done 0.5Hz with good results. Link to comment Share on other sites More sharing options...
byronomo Posted October 17, 2011 Author Share Posted October 17, 2011 Set-up a repeating timer.Thank you for your response. I'm fairly new at this, so I apologize if my question is a bit basic.....Does a repeating timer basically keep running in the background? If so, does this affect controller performance? Link to comment Share on other sites More sharing options...
Tokead Posted October 17, 2011 Share Posted October 17, 2011 What's so special about "loop" that it's not available to the end user in HE? Link to comment Share on other sites More sharing options...
RyanE Posted October 17, 2011 Share Posted October 17, 2011 Main reasons:1) Really easy to hang Director if you don't get the loop right2) With timers available, there aren't many programming situations where loop is needed.I have loops available in ComposerPro, and a fairly extensive project, and I don't believe I have *any* programming that uses the loop construct.RyanE Link to comment Share on other sites More sharing options...
Tokead Posted October 17, 2011 Share Posted October 17, 2011 Main reasons:1) Really easy to hang Director if you don't get the loop right2) With timers available, there aren't many programming situations where loop is needed.I have loops available in ComposerPro, and a fairly extensive project, and I don't believe I have *any* programming that uses the loop construct.RyanETx Ryan. That makes sense. My dealer programmed a couple of loops in my project for my alarSensor state - once a door is opened an announcement plays til the alarm is turned off. I thought this was normal. Link to comment Share on other sites More sharing options...
CFUG Posted October 17, 2011 Share Posted October 17, 2011 ^Yes, and I do the same announcement thing with timers. Link to comment Share on other sites More sharing options...
ILoveC4 Posted October 17, 2011 Share Posted October 17, 2011 I agree with the consensus that timers is the way to go here.Timers are slick. Before timers came along it was a PITA. Link to comment Share on other sites More sharing options...
byronomo Posted October 18, 2011 Author Share Posted October 18, 2011 I agree with the consensus that timers is the way to go here.Timers are slick. Before timers came along it was a PITA......Does a repeating timer basically keep running in the background? If so, does this affect controller performance? Link to comment Share on other sites More sharing options...
Tokead Posted October 18, 2011 Share Posted October 18, 2011 Could someone please post an example or a link to a site that shows how to set this up? I'm somewhat clueless with this stuff, and a picture say a a thousand wordsTIAToke Link to comment Share on other sites More sharing options...
CFUG Posted October 18, 2011 Share Posted October 18, 2011 I agree with the consensus that timers is the way to go here.Timers are slick. Before timers came along it was a PITA......Does a repeating timer basically keep running in the background? If so' date=' does this affect controller performance?[/quote']It does if you select the REPEATING tick box. I have run several (meaning four) timers simultaneously with no detectable issues. Link to comment Share on other sites More sharing options...
neil12011 Posted October 19, 2011 Share Posted October 19, 2011 ditto, I think I have one loop in all the lines of programming on my system. And it was only for a push and hold sequence before composer natively supported it. Link to comment Share on other sites More sharing options...
RyanE Posted October 19, 2011 Share Posted October 19, 2011 .....Does a repeating timer basically keep running in the background? If so' date=' does this affect controller performance?[/quote']This is why you issue the Programming Control STOP so the timer won't continue to run needlessly.The Programming Control 'STOP' does not stop a timer. There is a timer command to stop the timer.Timers can be repeating or not. A non-repeating timer will not keep running in the background. It will fire once (when the timer expires), and then never again unless you start the timer again.A repeating timer runs and fires every time the time expires, and then resets and starts itself over.There's not many resources used, and it should not affect controller performance unless you do something stupid, like make a *very short* repeating timer, and in the 'when Timer Expires event', put quite a bit of Control4 programming.If you were to do this, you could swamp the controller, slowing it down.RyanE Link to comment Share on other sites More sharing options...
CFUG Posted October 19, 2011 Share Posted October 19, 2011 ^You're right, I goofed when I wrote that one. The Programmed STOP is to keep the timer going. Link to comment Share on other sites More sharing options...
RyanE Posted October 19, 2011 Share Posted October 19, 2011 The Programmed STOP is to keep the timer going.I still don't know what you're talking about. Unless you're referring to specific code that has a timer stop after a programming command STOP, the one thing has nothing to do with the other.RyanE Link to comment Share on other sites More sharing options...
CFUG Posted October 19, 2011 Share Posted October 19, 2011 (PROGRAM LEVEL for DOOR CONTACT) If Door State CLOSED STOP START Timer X(PROGRAM LEVEL for TIMER) TIMER X EXPIRES If Door State CLOSED STOP Timer XThe last part of the above example can be coded two ways. The way I showed it you are right- no need for Programmed STOP. But if it is written the inverse way it looks like this-(PROGRAM LEVEL for TIMER) TIMER X EXPIRES If Door State OPEN STOP At any rate, I don't see where this type of feature is difficult to program as long as one has some idea where the programming features are within CHE. I'm out. Link to comment Share on other sites More sharing options...
RyanE Posted October 19, 2011 Share Posted October 19, 2011 Cool. Figured you were talking about something like that.Thanks for clarifying.RyanE Link to comment Share on other sites More sharing options...
byronomo Posted October 20, 2011 Author Share Posted October 20, 2011 Loop? I'm not aware of any "loop" command within CHE. Set-up a repeating timer. Watch the door and start the timer based on door state. Upon expiration of timer, re-evaluate door state and make a decision to stop timer and resume last known setting (use a variable to track light level, that is if variables works for you) or execute a Programming Control STOP.Your flash interval won't be exact as the processor has to prioritize operations but I've done 0.5Hz with good results.Might you be able to provide an example of how this can be done in ComposerHE? I keep trying but my controller gets bogged down (presumably from the repeating timer, but I don't know for sure).Thanks! Link to comment Share on other sites More sharing options...
drmark12pa Posted December 26, 2011 Share Posted December 26, 2011 Is there an easy way to make LEDs on a light blink a certain color for a certain state (ie I have my outdoors speakers on) to remind me that a certain event is happening (in this case to remind me to turn off the outdoors speakers before going to bed)?Could I use a timer, checked as repeating, and just stop that timer when I turn off the speakers? Link to comment Share on other sites More sharing options...
CFUG Posted December 27, 2011 Share Posted December 27, 2011 ^That's what I do. I have a powder room with two distictive color themes in it. I alternate the ON LED to those two colors every five seconds. Hey, I know I'm ghey, that's why I automate my toilet. You might want to do a reset then a stop if your timer is long in duration. That gives you a smooth pattern for the first cycle. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.