LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving text written in a string indicator on the front panel

Hi,

As a new LabVIEW user I'm trying to type a manual to explain how to use the software program I'm writing. I would like to display it on the front panel in one of the tab windows. There is quite a lot of writing and I would like the user to be able to scroll through the text. I tried inserting a string indicator, right clicking on it and selecting 'visible items'>>'scrollbar'. However, when I saved my changes the writing in the indicator was not saved with the rest of the changes. I'd be grateful for any advice.

Thanks,

Adrian

ah2002@columbia.edu
0 Kudos
Message 1 of 7
(4,358 Views)
Even initialize your indicator with a constant value or save it's value as default once you have written the text. Another option is to read the value from a file when you start, this will allow you to easier change it.
Good luck
0 Kudos
Message 2 of 7
(4,358 Views)
Gorka & Doug,

thanks! Making the current value default did it. Just out of interest, if I wanted to use the read from file.vi, what should I do assuming the file I want to read is stored on my computer as c:\adrian\file ?

Best regards, Adrian
0 Kudos
Message 5 of 7
(4,358 Views)
And if the file or program is moved then you have a problem. Under File functions is the constant "Current VI's Path", run this through "Strip Path" to get rid of the VI name and then add your file name in using "Build Path". If the file is in the same directory as the VI, this will work.

If you compile your VI, you have to change this to strip the path twice (because the VI name is added after the .EXE filename).
0 Kudos
Message 6 of 7
(4,358 Views)
If the file is going to be in that path allways, just wire the path to the read from file vi, else leave path unwired and you will be prompted to select a file.
0 Kudos
Message 7 of 7
(4,358 Views)
Adrian,
The 'data' in your string indicator was probably not saved as 'default', so that when you closed the VI and re-ran it, it was lost.

For any data (strings, numbers, etc.) that you want to have as default, you will need to rt-click the indicator/control and under data operations, select 'make current value default' (when you have the data entered).
Also - add an Invoke node function to force this indicator to display the default data upon initial running of the VI.

Another way, though, when you have a 'lot' of text, is simply save your info in a text file, and have a VI open the file and display it either as the text file itself, or as input into a string indicator.

Good Luck, Doug
Message 3 of 7
(4,358 Views)
Doug, thanks, making the current value the default did it!

Adrian
0 Kudos
Message 4 of 7
(4,358 Views)