LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write table values into a configuration file

Hi Jagan,

i thought the first example works. Smiley Happy What do you mean with configuration file, an *.ini file??

Mike

0 Kudos
Message 11 of 15
(1,340 Views)

Hi Jagan,

if you mean an ini file, here is an example for you. There are of course more ways to do it. Smiley Happy

Mike



Message Edited by MikeS81 on 05-01-2008 10:26 AM
0 Kudos
Message 12 of 15
(1,337 Views)
Hey Mike
configuration file in the sense, we are saving the parameter value of front panel in to a file using
open config >read key (load config) / Write key (save config)> close config vi's.
now u get what im asking . in that i need to save an 2d array. and to load without using file I/O that is without "write spreadsheet.vi".
0 Kudos
Message 13 of 15
(1,324 Views)
To write to an INI file you use the Configuration File functions. Those, of course, are still file I/O. There is no "automatic" format for 2D arrays. The INI format had no knowledge of formats. It's key=value. That's it. This means you have to make up your own format for how you want to save a 2D array to an INI file if that's what you really want to use. In the past I've seen people use something like
row1=value1,value2,value3
row2=value1,value2,value3

A simple loop, as has already been shown, can be used to create the strings.


Message Edited by smercurio_fc on 05-01-2008 08:53 AM
Message 14 of 15
(1,305 Views)
I should point out that the above example was for integer values, and it was for small arrays. The "value" part of a key is limited in length. You should consider an alternate method to save the 2D data. What exactly do you have against the spreadsheet-format file? It seems like the most natural way to save the data, rather than jumping through hoops to get it into a config file.
0 Kudos
Message 15 of 15
(1,295 Views)