06-28-2018 11:09 AM
Hi,
A colleague was telling me about using Shared Variables because the SVs preserved values between runs of the software. I have been looking online for a description of this property because I want to understand it's use case and limitations.
For instance, if I have an application on a Windows machine, run it for a while such that the SVs are populated, stop everything and reboot, what will the state of the SVs be?
Does data retention require the DSC module? And related to that, does data retention work in a cRIO? (Will the values persist across a reset?)
Thanks!
06-30-2018 04:38 PM
I would not trust Shared Variables to retain their values "forever" (or, say, through a Power Cycle/Reboot Sequence of the Host and Remote machines). A much safer way to "remember parameters between runs" is to use a Configuration (.ini) file or some other form of persistent (file) storage. Personally, I find XML more "user-friendly" and flexible, but that's a personal choice ...
Bob Schor
07-02-2018 08:16 AM
Hi Bob,
Since my original post, I have conducted some experiments. It looks like on Windows 7 with LabVIEW 2017, the shared variables do persist their values across power cycles.
On a cRIO with LV 2014, they appear to not persist their values across resets.
@Bob_Schor wrote:
I would not trust Shared Variables to retain their values "forever" (or, say, through a Power Cycle/Reboot Sequence of the Host and Remote machines). A much safer way to "remember parameters between runs" is to use a Configuration (.ini) file or some other form of persistent (file) storage. Personally, I find XML more "user-friendly" and flexible, but that's a personal choice ...
Bob Schor
Hi Bob,
Since my original post I have run some tests. One test on Windows 7 with LV 2017 did persist the values across reboots. Another test, this time on a cRIO with LV 2014 did not persist values across reboots.
I would still like to read about this feature.