LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer value between button presses

Hello all,
I am trying to simulate a cell phone key pad using Labview. The problem is with text editing. When the number 2 key is pressed, for example, the first key press is number 2, the second key press (within 300 mS) will gives the letter "a" and so on.
My question is : how do I monitor the elapse time between ke presses.
I have found this vi from NI Keypad Ver 5.vi. How can I modified this for my purpose.
Thanks in advance for the help and input.
Van
0 Kudos
Message 1 of 3
(3,302 Views)
Attached is an example of how to do the timing. Also, I've included a routine to count how many times the same button is clicked within the specified time limit. Cell phones need to track that so you can get to the letter "b" and such. I leave the interpretation of the number of repeats as an excercise to you. 🙂

Hint: When the number of repeats = zero just use the number, but when it is 1,2,3,4.... use letters and/or symbols. You can also use the divide with remainder function to cycle back to the number on the 4th repeated click!

Have fun,

Daniel L. Press
PrimeTest Corp.
www.primetest.com
0 Kudos
Message 2 of 3
(3,301 Views)
I've modified the example to behave the way that you ask. I added a few shift registers to keep track of elapsed time, number of times pressed, and last button pressed. Take a look at it and see if it makes sense to you, if not let me know and I can provide a more detailed explaination. I saved it to LV version 5 because I wasn't sure what version you were using.

Hope it helps

Brian
Download All
0 Kudos
Message 3 of 3
(3,301 Views)