From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ini-file read key problem

Hello there

i've made an settings-vi that allows me to make some settings and save them in an ini-file. first i'm searching vo a key and if it isn't found i create a ini-file with default settings. in the initialisation of the vi i do also read all keys and display them on my frontpanel.

and this is the problem. first time i start my vi. i can't get the keys diplayed on the frontpanel. i'm searching for a section and a key and they wouldn't be found and there is not data returned.

the second time i run the vi the keys were found and the data is correctly returned.

thanks 4 help
0 Kudos
Message 1 of 2
(2,789 Views)
Hi,

The problems is that the "Pfad des INI-Files" is empty when you start the first time but you pass the contains through the Sequence to the first Open Config.vi. Then you change the contents via the propertry node but its to late as the empty path has already been passed. The second run, "Pfad des INI-Files" already has the correct path and therefore the file can be opened correctly.

Instead instead your sequence use a Local Variable to that you get the latest contents of "Pfad des INI-Files".

Attached is a modified VI. in LV 6.1

Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 2
(2,789 Views)