Counter don't work in ELK M1G ?

Hello, I am trying to use a counter to keep track of 3 modes of operation.

1st rule: Whenever F5 key is pressed and counter = 1 then counter = 2 then display mode 2
2nd rule: Whenever F5 and counter = 2 then counter = 3 and display mode 3
3rd rule: W F5 and counter >2 then counter=1 & display mode 1

The problem is no matter what I do The keypad always displays mode 1. I tried disabling rule 3 and then it always displays mode 3. It is like it is returning a yes answer to all 3 questions and which ever is last gets the say.

Any Ideas?
Thanks for your help

Mike
 
I just got it. I'll post in case it can help anyone else.


All rules begin with if F5 key pressed

Rule 1 If counter >3 then counter = 0
rule 2 add 1 to counter
rule 4 if counter = 1 then do function 1 and display what doing
rule 5 if counter = 2 then do function 2 and display it
rule 6 if counter = 3 then etc

Thanks
 
Back
Top