This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How Do I Change Default Values in a LabVIEW Executable?

Updated Dec 6, 2018

Reported In

Software

  • LabVIEW Professional
  • LabVIEW Application Builder Module

Issue Details

I've created an executable in LabVIEW and want to change the default values of the controls, and the Data Operations»Make Current Value Default option is not available. How can I set and change the default values of the controls?

Solution

You can change the default values in your LabVIEW executable by using Configuration VIs to read and write to an ini file. The configuration shipping examples in LabVIEW 2009-2012: Read Configuration Settings File VI and Write Configuration Settings File VI show how this is accomplished. These can be found by navigating to the NI Example Finder, and then clicking on Fundamentals»File Input and Output. The examples in LabVIEW 2013-2017 are contained in the Configuration (INI) project: The Configuration (INI) project can be found in the NI Example Finder under Fundamentals»File Input and Output»Configuration (INI)

Default values can also be saved by writing them to a text or lvm file if you choose not to use the Configuration VIs. This has been demonstrated in NI Community: How to Save and Read Control Values Programmatically. The examples show how a user can use the Read from Measurement File VI alongside the Write to Measurement File to save the values of the controls. The values of the controls are merged together and saved to a specified file path. The user can then choose to read from that file the next time the VI is opened.

WAS THIS ARTICLE HELPFUL?

Not Helpful