Hi. This is solved by using a case structure inside a while loop and shift registers to keep track of how many times a button has been pressed. Instead of writing a very long written description, I will let you look at the code, and let me know if you have questions. If you cannot open the VI, which is in version 7.0, you can look at the image. In case 1 of the case structure, you would increment by 1 the second wire going to the shift register (instead of the first one as in case 0 shown).