Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Data limiting a string

In LabView 6i. Can you limit the amount of characters a user inputs on the front panel of a vi ? ie first name can only be 6 charaters in lenght otherwise default to 6 a's or something. Or popup an error message. Something like Labview does with numeric indicators.
0 Kudos
Message 1 of 2
(2,422 Views)
This is quite easy and straight forward to do in LabVIEW 6.1 with event structures, but 6i requires a bit of a hack.

For LabVIEW 6i:

What I would do is create a VI that takes in a reference to a string control and outputs a string. In the VI, use the reference to read the string and apply any filtering that you want to it, output the filtered string to a property node to change the value of the string control and output to the string indicator and close the reference to the string control.

Then, in your main program, whenever you want to read the value of the string, instead create a reference, wire it to the VI, and use the output of the VI instead. This way you have the filtered string, and your string control is updated to the filtered string also
.

Good Luck!
0 Kudos
Message 2 of 2
(2,422 Views)