LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create several Default INI files for users

I am working on a project and I would like to be able to load certain default values for the whole front panel depending on the experiment.  On this Front panel there are 8 selectable that I would either like on/off, so I need to be able to include that in the default values.  I would like to do this from and INI file but I am not sure how to get the defaults for the whole front panel into a single file.  Attached is a picture of the front panel I am working on for reference

0 Kudos
Message 1 of 5
(2,930 Views)

This should be very easy to do. There are also many different way to accomplish this. Do you want other to see the setpoints? Do you want to be able to edit them in the windows environment?

 

I usually save the control name or caption name depending on what I am doing in one column and the value in the next colunm. If I do not want someone to see them I can save as a binary file or encrypt the file. If I do not care I can save the file as a text file.

 

Then all you have to do is save the file and read the file. Find a place to store the file where your program can find them. You could also use the registry. You will need to be careful with this as you can damage the computer if done incorrectly and you many not have acces on all computers to the regisrty.

Tim
GHSP
0 Kudos
Message 2 of 5
(2,924 Views)

I've found this openg_lib to be very useful for things like this.

0 Kudos
Message 3 of 5
(2,908 Views)

I will not need to see the values, I just need to be able to set them and then call them back again.  I think the part Im hung up on is how to create the text file, and how to integrate it into problem.  It would be nice to change the values in the window, but its not a necessity. 

0 Kudos
Message 4 of 5
(2,903 Views)

Here are a couple of examples that may help illustrate what the others are talking about.

 

Community: Programmatically Save and Retrieve Front Panel Control Values
http://decibel.ni.com/content/docs/DOC-4707

 

Community: Save Front Panel Control or Indicator Values to Spreadsheet File
http://decibel.ni.com/content/docs/DOC-9529

 

How Can I Save Front Panel Controls to a Configuration Settings File?
http://digital.ni.com/public.nsf/allkb/49D5A041D89FADE686257213007B7EEC?OpenDocument

 

Best,

Chris LS

National Instruments
Applications Engineer

Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 5 of 5
(2,877 Views)