sam Posted October 30, 2006 Report Share Posted October 30, 2006 File Name: Data Repository with INI files (not a Source-Code-Control) File Submitter: sam File Submitted: 30 Oct 2006 File Updated: 31 Oct 2006 File Category: Database and File IO Data.vi V1.0.0 LabVIEW Versions 7.0,7.1 Copyright Quote Link to comment
Bobillier Posted October 31, 2006 Report Share Posted October 31, 2006 Please is it possible to have your code in 7.0 ? Regards Eric Quote Link to comment
sam Posted October 31, 2006 Author Report Share Posted October 31, 2006 Hi, I just added LabVIEW 7.0 code. Try to download again. -Sam Quote Link to comment
Neville D Posted October 31, 2006 Report Share Posted October 31, 2006 Hi,I just added LabVIEW 7.0 code. Try to download again. -Sam Just as an aside, not to take away anything from Sam's effort, you can save/read back any LabVIEW data structure very easily to an xml file, making the ini file functions more or less redundant. I have written complicated structures of clusters/arrays/booleans very easily with just a single VI. The read is fairly easy as well. I think the xml read-write VI's were introduced with LV 7. Neville. Quote Link to comment
sam Posted October 31, 2006 Author Report Share Posted October 31, 2006 With this VI I am only pointing out exclusive write access to data. Inside the VI you can use ini or xml or databse to save your data to disk. I have used/using sqlite3 (using openg variants to save LabVIEW objects to sqlite3.). Also if you have a giant Cluster and pass it to openg's cluster to INI it will be saved in one action. But I often browse the INI file with ini-aware text editor and grouping items makes it easier to browse. Quote Link to comment
Michael Aivaliotis Posted November 1, 2006 Report Share Posted November 1, 2006 making the ini file functions more or less redundantI disagree. I continue using ini's and still will well into the future. XML is great but it's not very human readable. Quote Link to comment
Mike Ashe Posted November 1, 2006 Report Share Posted November 1, 2006 I disagree. I continue using ini's and still will well into the future. XML is great but it's not very human readable.Especially NI's current version of XML. It is a bit verbose, but does seem to work. I'd like to see them compact it up a bit, and include attributes about the data on the same line instead of multple lines.Again, not to take away from Sam's effort, which I think is great, but I like the INI version that Jim Kring did using the OpenG variant config file VIs. Sam's effort has the virtue of plugging in the file format of your choice. Perhaps this could be made an explicit plug in API. Keep up the good work Sam! Lastly, if someone is going to use XML, (ie, NI's XML) it becomes marginally more readable if you indent it. There is a VI on NI Dev Zone to do this. Reformat LabVIEW XML for Simple Text Editors Quote Link to comment
MartinD Posted November 24, 2006 Report Share Posted November 24, 2006 Hi all, When I try to save an array all I get in the file is: [Motion config] Axis names.<size(s)>=0 Where "Motion Config" is cluster containing an array (labeled "Axis names") of strings with 8 elements. The size should be 8 and the element data should be stored in the file - right?. Does anyone what I'm doing wrong? TIA - Martin Quote Link to comment
Randy Posted November 27, 2006 Report Share Posted November 27, 2006 Here is a VI that utilizes another method for reformating an XML file, this one doesn't care about incoming format since it is not doing the parsing through Labview itself but using the SAX Reader. Download File:post-3040-1164601534.vi Randy Lastly, if someone is going to use XML, (ie, NI's XML) it becomes marginally more readable if you indent it. There is a VI on NI Dev Zone to do this. Reformat LabVIEW XML for Simple Text Editors Quote Link to comment
MartinD Posted November 27, 2006 Report Share Posted November 27, 2006 Hi all,When I try to save an array all I get in the file is: [Motion config] Axis names.<size(s)>=0 Where "Motion Config" is cluster containing an array (labeled "Axis names") of strings with 8 elements. The size should be 8 and the element data should be stored in the file - right?. Does anyone what I'm doing wrong? TIA - Martin Figured out myself - Needed to set the data before saving, of course! :headbang: Quote Link to comment
crelf Posted November 27, 2006 Report Share Posted November 27, 2006 ...Needed to set the data before saving, of course! Bugger! :laugh: I couldn't replicate your problem - now I know why Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.