Global Variable Persistence Example


Recommended Posts

I needed to gather and persist to HDD all entries into several sets of configuration/calibration data EditBoxes on a setup page - not a data acquisition page (I am familiar with the reasons for using EditBoxes and such on modal dialogs instead of on running control and monitoring pages).

I studied the documentation some more and opted to use Registry-stored values, since such data is only added infrequently in this system, and then only during manual operator intervention, so the slightly slower access times for Registry data is not an issue.

Thanks for your support - IT ROCKS!

Link to comment
Share on other sites

If you have a bunch of configuration data, you might consider using an object to store all the data, then use the ToJson / FromJson along with the File. functions to log it all to a file. Its a little more involved (meaning a few more lines of script), but it is self-organizing, and doesn't have the limitations registry variables have. If, however, you only have, say, 3 or 4 values, then registry variables are easiest.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.