To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This is an example of how to save the value of enum controls on the front panel to a .xml file and subsequently restoring them.
Description
This example shows how to save enum controls to an xml file and then reads the same xml file to restore the data. There are two VIs: Saving and Restoring.
The Saving VI first gets the name and value of the enum control using property nodes and then saves them as two values in a cluster. This cluster is then converted into xml format and written to a text file for readability.
The Restore VI then reads the xml file and converts it back into a cluster of two elements. We then read the two elements to restore the data into the enum.
This is just an example of one method of saving controls with an xml file. Instead of using xml you can use the OpenG library or the configuration VIs included with LabVIEW.
Steps to Implement or Execute Code
Requirements
Software
LabVIEW 2012, 2011, 2010
Hardware
None
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.