LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving application state for later resume

Solved!
Go to solution

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.

0 Kudos
Message 1 of 13
(3,648 Views)

OpenG has a good library for saving your information into a configuration file.  I recommend having a look at those.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(3,633 Views)

Thanks, I'm looking into it now. What about XML? I made a working prototype doing the flatten to XML route.

0 Kudos
Message 3 of 13
(3,627 Views)

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

0 Kudos
Message 4 of 13
(3,620 Views)

Here's what I got to work for me:

 

What's usually difficult about it?

0 Kudos
Message 5 of 13
(3,615 Views)

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

0 Kudos
Message 6 of 13
(3,596 Views)

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!

 

0 Kudos
Message 7 of 13
(3,588 Views)
Solution
Accepted by ijustlovemath

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 13
(3,568 Views)

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.

0 Kudos
Message 9 of 13
(3,558 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 13
(3,540 Views)