![]() |
|
How to use Timers - 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: How to use Timers (/thread-1680.html) Pages:
1
2
|
- ident - 06-26-2013 Quote:I think PAUSE means to suspend response execution for xx seconds. Like a Threading.Thread.Sleep in response code. But a Response cannot be paused. It always executes the actions and finishes. It may start a timer, but it does not wait til the timer finishes before going to the next action. A Timer action is started, then the timer is left to run until it expires, when the Target Response is executed - clubpenza - 11-25-2013 I\'d like to be able to vary the duration of a timer, based on the input from a KT03 slider control. casino online holiday palace sbo - ident - 11-25-2013 No, currently that is not possible what application do you have in mind and why do you find that to be helpful? - srooks - 01-15-2014 You asked for an application .. in my case this would be the duration for running a sprinkler. I\'d like to be able to set this duration via a KT03 slider. - siamak - 01-20-2014 Is it possible to do that with a response that increase/decrease a counter which is compared to zero, and two timers triggers the responses of -let it be called- countdown? in this case the counter will be decreased by the timered responses to the point which the sprinkler runs. - ident - 01-22-2014 I could not really figure out what Siamak was suggesting. Possibly it would be a good idea to set a timer value from a counter, and more convenient for the user, we will look at this possibility - siamak - 01-24-2014 Sorry for my bad explanation, here is what was i suggesting. Set slider (Counter000) min/max value to 20 and 100 assume that Zone02 OnResponse is SprlnklrCntDwnStrt SprlnklrCntDwnStrt: Copy Counter Counter000 To Counter001 Clear Flag Flag01 Do SprnklrCntDwn1 SprnklrCntDwn1 : If Counter Counter001>= 100 And Flag Flag01 = 0 Then Do SprnklrRun End If Get Counter Counter001 Add Immediate 5 Set Counter001 Do SprnklrCntDwn2 After 2 Seconds Using Timer01 SprnklrCntDwn2: If Counter Counter001>= 100 And Flag Flag01 = 0 Then Do SprnklrRun End If Get Counter Counter001 Add Immediate 5 Set Counter001 Do SprnklrCntDwn1 After 2 Seconds Using Timer01 Assuming an Abort switch on Zone03, Zone03 OnResponse would be AbortSprnklr AbortSprnklr: Stop Timer Timer01 Clear Flag Flag01 Here we have max of 32 and min of 0 seconds from Zone02 Activation to sprinkler run with 2s steps, these could be changed by simply changing the slider min/max value and 2 sec expiration times of SprnklrCntDwn1 and 2 Responses or changing the Add Immediate value. Also it could be a timer between SprlnklrCntDwnStrt and SprnklrCntDwn1 (by Do After Timer Expires) to add a fixed time before sprinkler run. Note that if in the project it is possible for Zone02 to go Off and On in a short time, which could be in count down time, there would be consideration to avoid repeating the countdown from start and extending the time to run the sprinkler. Also there would be a \"Time Extending\" button on the keypad, simply triggering a response which sets counter001 to a fixed value. - ident - 01-25-2014 Thanks for such a detailed response - slychiu - 12-24-2014 Quote:Is it possible to set the duration of a timer from a counter? I\'d like to be able to vary the duration of a timer, based on the input from a KT03 slider control. S Actually this is already possible In the action Do Response x seconds using Timer, if the number of seconds is =0, then the last action value is used as the delay. See the example below. Get Counter Counter003 Do Response after 0 seconds using Timer01 This means that the delay is taken from Counter 3 instead of a fixed value in the action ![]() |