PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

limit characters in a string input

Hi,
In LabVIEW, I'm trying to limit the number of input char entered by the operatot to 8 char. How do I set the string field to accept only 8 char and ignore the rest.
Thanks
Dan
0 Kudos
Message 1 of 7
(3,999 Views)

to limit the number of input char entered by the operator to 8 char,

the simplest method would be to find number of characters by using 'string length' function. If the length is longer that 8 characters, pop up a message stating so(optional) and ingnore/reject that string

How do I set the string field to accept only 8 char and ignore the rest

To do this, use 'String subset' function, with offset=0 and length =8

 

Message Edited by devchander on 09-14-2006 10:28 PM

0 Kudos
Message 2 of 7
(3,994 Views)

A small tip.

In future, post your labVIEW related queries in LabVIEW discussion Board for a quicker response Smiley Wink

 

0 Kudos
Message 3 of 7
(3,992 Views)
This should do it too. Look at the attachment
 
Regards,
Chetan K
Application Engineering
National Instruments

Message Edited by CKap on 09-15-2006 09:29 AM

0 Kudos
Message 4 of 7
(3,992 Views)
Thank you all for your responses. That would give me a lot of ideas to work on.  
Dan
0 Kudos
Message 5 of 7
(3,983 Views)
could you please post a picture of block diagram of your limit_to_8.vi??
0 Kudos
Message 6 of 7
(3,972 Views)

Here you go Dev.

 

Regards,

Chetan Kap

Application Engineering

National Instruments

0 Kudos
Message 7 of 7
(3,963 Views)