08-12-2010 02:22 PM
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
08-12-2010 02:40 PM
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.
08-12-2010 02:55 PM
I've found this openg_lib to be very useful for things like this.
08-12-2010 03:00 PM
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.
08-13-2010 04:35 PM
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