07-14-2015 11:49 PM
Hi,
I would like to simply remember the last data before the PC was turned OFF.
In the attached example, I need to hit the Exit (Stop) Button to remember the last data,
but the application is more rugged that PC is sometimes instantly powered OFF (without going
to the normal shut down procedure).
I would appreciate for any advise.
Thanks a lot.
Regards,
jtc
07-15-2015 12:20 AM
Your VI does not save anything and all is lost if the computer shuts down. All yor data is kept in volatile memory.
You need to write to disk at regular intervals, because once the PC shuts down, it is too late for any programmatic action. Then, next time the program starts, read the save location and continue where you left of.
07-15-2015 12:48 AM
Hi Sir,
Thank you for your kind reply. I guess i dont have other option but to write on the PC disk and read
that saved data when the PC/LabVIEW runs again.
Do you have any simple vi that i can work on ? I just need to save the last numerical value everytime
the PC is shutdown. Also, how can i prevent that file on getting heavy (accumulated data over time) ?
Thanks a lot.
07-15-2015 12:51 AM
You would use a binary file and always write your DBL value at position 0. The file will never be more than 8 bytes. You might want to alternate between two files, because one might get corrupted if the PC shuts down during writing.