07-31-2011 05:10 PM
In the attached vi, I'm trying to accept only numbers and letters. When I hit the Shift key, I get error -4702. How can I correct this situation?
I haven't worked this in yet, but I would also like to accept the Enter key so that the vi will terminate either Enter or the OK button.
Also, in the Event structure, what's the difference between "Key Down" and "Key Down?" ?
Thanks in advance.
Solved! Go to Solution.
07-31-2011 05:49 PM
@Vi Joe wrote:
I'm trying to accept only numbers and letters.
Why don't you use "lexical class"? Seems easier (accept for class 3-5).
VI Joe wrote:I haven't worked this in yet, but I would also like to accept the Enter key so that the vi will terminate either Enter or the OK button.
Wire the "VKey" output to a case structure, right-click ...create case for every value. Pick the cases you want and add your code, make one case default, then right-click...delete empty cases.
@Vi Joe wrote:
Also, in the Event structure, what's the difference between "Key Down" and "Key Down?" ?
Events with a question mark are filtering events. They allow you to discard events. Check the help. Events without question mark are plain events and don't have the discard terminal on the right.
07-31-2011 06:10 PM
07-31-2011 09:23 PM
Thanks so much for your eligant solution!
I don't get context help when I hold my cursor over the filter events, nor am I finding detailed info in the LabVIEW help on the particular filter events. Any suggestions?
Thanks again.