LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set preset values that can be selected from a pull-down manu

I am writing a VI in LabView 7.1 to collect data. I have a set of variables that need to be set at the beginning. I used Basic Information subVI to input these variables to be saved in the data file header, but everytime I run the VI I have to type in pretty much the same thing. The variables I use usually can be selected from a list of number, text or Y/N. I thought about using Configure File VI, but I think that will only give me a fixed set, not a choice. I wonder if there is a way to preset a list of variables so that I can select one value from the list rather than type in everything each time.
 
Thanks,
 
Ron
0 Kudos
Message 1 of 3
(2,405 Views)
1. Write a Vi that have all your variables i.e. enum, ring, text controls, boolean controls etc
  • When this Vi is called, it allows user to configure all settings
  • There will be a "save" button. Upon clicked, it should prompt user to input a filename (i.e. *.ini) and the file will be saved to a pre-determined directory i.e. LabVIEW Default Directory
  • With the above, a new *.ini file is created for respective set of variables.

2. Knowing that all *.ini files are stored at LabVIEW Default Directory, make use of the attached example VI, modify it to suit your needs, to get all *.ini filenames and update to the Combo Box control

  • With the Combo Box control, you can now choose the desired configuration file (*.ini) to be loaded for the rest of the test needs.

3. The selected *.ini file path is now input to a Vi that does the extraction of all variable settings from the selected *.ini file.

 

Above is just one of many ways that you could have a pull-down menu for selecting a set of settings from a set of configuration files.

Hope this make sense to you 🙂

Cheers!

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
Message 2 of 3
(2,402 Views)

Thanks Ian. I will give it a try and let you know how it works.

Ron

0 Kudos
Message 3 of 3
(2,382 Views)