Sandpiper
Active Member
Glad to hear that this little rule is working. Now on to a try at answering the timer/counter questions above.Thats the same rule I was using, and it doesnt work properly. I ended up using the phantom output method, and it works perfectly. Oh well! So when would you use a counter or a timer?
I come from a background in industrial automation (such as in PLCs), so I have a lot of experience in implementing timers and counters. Elk M1 rules are similar to , but not the same as in industrial automation, and in my opinion, the Elk method of rule implementation is quite quirky. That being said, still I find that I can still do almost everything I need to in this small and simple automation controller.
1. Why doesn't the counter rule work? I really dont know. One of the M1 quirks is that it has very little debugging capability. It is not possible to examine a timer in operation, and counters can be examined but only by sending a message to the keypad. If we could examine the counter value easily we could debug this. Also it would helpful to be able to examine outputs as you can with inputs. I think the STATUS screen should display the status of outputs, timer values, and counter values, as well as the input status.
2. The ELK timers, as far as I can tell, as always implemented in conjunction with an output. Although there is a setting in the Custom Settings for "timers", "Counters", and "Time of day", I dont know how you would use the "timer" setting. Timers are always used like this: THEN TURN OUTPUT 100 ON FOR 20 SECONDS.
3. Counters can be used to .....well.....count things. One advantage counters have over other M1 variables, is that the value can be sent to the M1 keypad in a "text". For example, lets say the kids are allowed to open the back door 5 times before you get mad. So a counter can be used to count the number of times the door opens and a text is then sent to the keypad every time. Now if you want to check to see how mad you are suppose to be, check the keypad. Perhaps on the sixth time, the M1 girl can make an announcement that the limit has been exceeded, and that you are hopping mad.
Just for understanding purposes.....The failed rule you posted is using a counter as a timer, rather than just using a timer. As I said, I dont know why it doesnt work. the only thing I could suggest is to change this
WHENEVER GARAGE DOOR [COUNTER1] CHANGES TO 0
to this
WHENEVER GARAGE DOOR [COUNTER1] CHANGES TO LESS THAN 1
Perhaps the value is going negative before it is seen as exactly 0.
Have fun and keep trying.