LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatically save data from previous application runs

I am writing a timer box program, that has an automatic shutoff.. Is is possible to save data and continue to use it after the program has stopped...
 
For example I stop the program with a count of 50.  When I restart the program I can choose to start at 51 or 50, with out resetting the  count of 50 as the default.  This is for ongoing testing and I would really like to add this feature to my applicatin
0 Kudos
Message 1 of 2
(2,318 Views)
If you are just stopping and starting the program, keep your count in an uninitiallized shift register that you increment with each event. The shift register will keep the current values between runs as long as the VI remains in memory.
 
If you want to retain the count even after completely closing the program, you need to save the desired starting value e.g. in a configuration file that gets read when the program starts and gets written when the program is stopped or closed.
0 Kudos
Message 2 of 2
(2,315 Views)