LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pick up from where I quit last time from a LabVIEW appliaction

Is there an easy way that I can dump the current state of a Labview program/application into a "memory dump" file before I quit the program, so when I restart this LabVIEW application, it restores the info from this "memory dump" file, so I can pick up where I left off exactely?   

 

Thanks.

 

Ian

0 Kudos
Message 1 of 10
(3,081 Views)

You can use INI files or XML files to store the current state of the front panel controls and then during the loading phase of the app, if a file exists, load the values into the appropriate controls and delete the file. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 10
(3,067 Views)

aputman

Thank you for your input. I am not sure if we are talking about the same method, but I found the following that can work for me.

 

It sets all controls to their last states only, it does not set indicators to their last states. I think I can live with it.

 

https://decibel.ni.com/content/docs/DOC-3551

 

Thanks again.

 

Ian 

 

0 Kudos
Message 3 of 10
(3,047 Views)

aputman was answering your question. He is saying that you can programmatically save the values of your controls, as well as any other state information you may need to a file. When the application starts it loads the files, resets everything to the satet and resumes execution. If you are using a state machine you can literally pick up where you left off in your state machine. Unless everything you are using in your VI is a control your method will not be able to resume with everything reset to its last value. Only control values will be initialized.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 10
(3,038 Views)

Mark/aputman

 

Thanks. Can you attach a simple example to elabrate? 

 

On the method I found, I realized if I set "Controls" to "false", I can save and then load and reset values for all indicators too.

 

Thanks

 

Ian

0 Kudos
Message 5 of 10
(3,029 Views)

Here is an example of how I usually do saving/loading of configuration data. It uses the MGI RWA (Read Write Anything) library which you can download for free. Just go to VI Package Manager and search for MGI RWA, and install it.

 

--Hope

0 Kudos
Message 6 of 10
(3,015 Views)

Just realized you may not have 2016 yet. I backsaved it to 2014, hopefully that works for you.

0 Kudos
Message 7 of 10
(3,012 Views)

OpenG library has a VI called "Write Panel to INI".  It's in the Variant Configuration File palette.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 8 of 10
(2,971 Views)

Oops. I just read your post above with the link to the article about CtrlVal.GetAll.  Yes, that is the method that OpenG VI uses.  It will also write indicator values.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 9 of 10
(2,968 Views)

aputman

 

Many thanks.

 

Ian

0 Kudos
Message 10 of 10
(2,949 Views)