Example Code

Save Control Values in a File and Load them as Initial Values

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Coding that exemplifies how to save and load the values of the controls in the Front Panel in a file.

 

Description

This VI allows the user to save the current value of the controls in his Front Panel and load them at the beginning of the next time he runs his VI. This can be used in a wide variety of applications which requires us to continue testing after some time of inactivity and the control values are not static.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Be sure that the uno.dat is in the same folder as the VI
2. Run the VI
3. Change the control Values
4. Select the button to update the values in the file
5. Stop the code
6. Erase all the values in the Front Panel
7. Run the VI again
8. Verify that the values are updated
9. Stop the application


Additional Information or References

Capture.PNG

Francisco Arellano

National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Rusty J
Member
Member
on

Interesting example - I wouldn't have thought of using a binary format for saving mixed data types like this.