LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML File Sharing Pros/Cons

I am writing a Labview based data acquisition and test program that will collect and save test data.  One of the requirements of the program is that I want to be able to easily share files among different programs, such as Excel, Matlab, and possibly Diadem.  I am contemplating using XML for this purpose, but I wanted to hear opinions on the pros and cons of using the XML based File I/O in Labview. 
 
For instance,
 
- How easy is it to port XML files into the programs that I have listed?
- Are there any major restrictions on data types or use in Labview that I should know?
- How does the file size compare to using the Labview datalog format or ASCII?
 
Thanks!

Rob
0 Kudos
Message 1 of 3
(2,933 Views)
I would not recommend XML for data storage.  XML is great for documents and message passing, but there are too many problems with it to make it worth the effort for data storage.  It is slower than simple tab-delimited text due to the overhead of processing tags.  It is larger than tab-delimited text due to the tags.  LabVIEW support is somewhat restricted unless you roll your own encoder (not difficult, I have done it).

That said, you still have two very good options which will interface to all the programs you list.
  1. Tab-delimited text.  This format is highly supported and can be read by almost anything.  It has speed limitations and starts to run into real performance issues at about 50,000 points per channel (Excel limit at 65,535 points/channel) or 1,000,000 points total (parsing time issues).  It is also has a relatively flat structure.
  2. An SQL database.  Everyone talks to SQL.  This is probably your best binary option and can be read by almost anything.
A third option is HDF5 (NI-HWS), but DIAdem support isn't there yet and NI only supports waveform data types.  There is an unsupported toolkit you can download here, but the learning curve is pretty steep.  That said, I love HDF5 and use it all the time in LabVIEW.  It is my method of choice for complex data storage.
0 Kudos
Message 2 of 3
(2,919 Views)
Hi
 
I agree with DFGray - if you just want to exchange data very easily, use a spreadsheet-file.
 
I love xml-files - but just to store settings.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 3
(2,915 Views)