LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

input only alpha or numeric character

I have a serial number string with A-Z mix with number.
ex: serial number 12345VF890-34 (nnnnnAZnnn-nn).
As the user type on the keyboard.
How do I force the input control string to accept only number when needed and character when needed?
0 Kudos
Message 1 of 4
(4,336 Views)
Here's a vi that tests whether user pressed a letter or number. You can build on this, keeping track of what position the S/N string is in (string length). When you get the correct type, concatenate it into the rest of the string, otherwise throw it out.

Hope it helps.

Tim
Message 2 of 4
(4,336 Views)
trout00;

I am attaching a VI that may do what you want.

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 3 of 4
(4,336 Views)
Ups, sorry, I didn't noticed Shan already answered this question.
www.vartortech.com
0 Kudos
Message 4 of 4
(4,336 Views)