12-06-2015 02:34 PM - edited 12-06-2015 02:35 PM
I've got an application that runs a few pumps and logs about 40 elements (from two different typedeffed clusters) every few minutes. The pump rates are determined by about 10 of those elements. I'd like to add functionality to take the application down, and dump the state of these clusters into something like a spreadsheet, and resume later with all of these values put together. Theres also a waveform chart whose data I'd like to keep, as well as some front panel object states (buttons being disabled etc)
How would you guys handle this? I've tried using somehting like a flatten variant to string, but that's rife with errors.
Solved! Go to Solution.
12-06-2015 03:18 PM
OpenG has a good library for saving your information into a configuration file. I recommend having a look at those.
12-06-2015 03:21 PM
Thanks, I'm looking into it now. What about XML? I made a working prototype doing the flatten to XML route.
12-06-2015 03:36 PM
I happen to like XML, but I find the "vanilla" LabVIEW XML functions "intimidating" (and there are several slightly different LabVIEW XML schemata), so I've sort of "rolled my own". For now, you are probably "safer" with Configuration files.
Bob Schor
12-06-2015 03:40 PM
Here's what I got to work for me:
What's usually difficult about it?
12-06-2015 04:15 PM
If you are happy with it, why are you asking about it? Just use it (or use Configuration Files, if you prefer). I wasn't using XML for saving Configuration data (well, that's not entirely true, one element of my Header file was my DAQ Channels and Scales, taken from a XML Configuration File ...).
Bob Schor
12-06-2015 04:18 PM
I was just looking for other opinions, I usually find lots of them on this forum! I'm definitely going to look into the config files, and weigh the benefits. Thanks!
12-06-2015 05:03 PM
@ijustlovemath wrote:
I was just looking for other opinions, I usually find lots of them on this forum! I'm definitely going to look into the config files, and weigh the benefits. Thanks!
It is mostly a question of how readable you want the files to be. If you want to clearly read the information in a text editor, go with the configuration file. If you want something a little obscure, but still somewhat readable, go with XML. If you don't want the users to be able to read this thing at all, Just save to a binary file which will be faster and likely be smaller.
12-06-2015 05:18 PM
Okay, thanks for the advice. I've also heard TDMS is sort of a combo of the two, but I haven't really looked into it yet.
12-06-2015 06:55 PM
@ijustlovemath wrote:
Okay, thanks for the advice. I've also heard TDMS is sort of a combo of the two, but I haven't really looked into it yet.
TDMS is great for waveform or series data (ie arrays). I would not use it for configuration.