From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-17-2009 03:42 PM
I am working on a large project that is a long term test (years) certain events must occur at certain time intervals after other events.
How do I save the current state everything was in if three months into the test the program needs to be restarted, computer rebooted, crashes, power outage, etc...?
04-17-2009 03:47 PM
Hi RTSLVU,
the concept is the same for long term tests as for short runs:
- before exiting the program (or at regular intervals) save the current state to a file
- when starting the next time you read the file and use its information
The file format is doesnt' really matter, but LabView offers functions to read/write ini files (aka Config files), XML files and plain ASCII files. It's up to you!
04-17-2009 03:54 PM
GerdW wrote:Hi RTSLVU,
the concept is the same for long term tests as for short runs:
- before exiting the program (or at regular intervals) save the current state to a file
- when starting the next time you read the file and use its information
The file format is doesnt' really matter, but LabView offers functions to read/write ini files (aka Config files), XML files and plain ASCII files. It's up to you!
Yeah, that's kind of what I fuggured...
This is my first time developing a program of this scale, I have never had to really worry about such things before.
Here is my first attempt at reading from a config file
04-20-2009 03:32 PM
Hi RTSLVU,
There is a set of examples that come with LabVIEW that write to and read from a configuration file. You can find them in the Example Finder under Fundamentals » File Input and Output. The Write Configuration Settings File.vi example saves the values of your controls on the front panel to a configuration file and the Read Configuration Settings File.vi reads that config file.