LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read and write to same cluster

Hi!

I have a subVI containing settings for the mainVI and when the "Settings" is called for from the mainVI a pop-up window opens that shows the current settings. These settings should be read from a ini-file and showed as a string in the settings window. When changing the settings they will be written to the same ini-file and used next time the program starts.

My problem is that I can't figure out how to both be able to read from and write to the same string (control/indicator). Either it works with the reading or the writing and I have no idea about how to do both.

I have attached a file with what I am working with. I have tried a few different methods but it wont work. As the file is now the write function works but when the program is closed and the opened again the Default values is shown in the string indicators.

(I understand that the problem somehow is that I am trying to read and write to the same file, but how to solve my problem?)

 

 

0 Kudos
Message 1 of 2
(2,130 Views)

I recommend you to use one vi to initilalize, read and write from the .ini file, and one vi to take care of the user interface. Are you familiar with functional globals?

 

http://labviewwiki.org/Functional_global_variable

0 Kudos
Message 2 of 2
(2,122 Views)