05-16-2011 04:25 PM
Hi there.
I have a set of 26 commands of a user defined type, and 26 associated floating point input values. I'd like to put these commands and input values into an array to be read later. I can plug in all of these values into an array from the front panel, but when I close the program they are cleared from memory. I was thinking of loading these commands and values in from a text file, but I don't know how to import text data and translate it to a mixture of user defined type data and float data, then store it in an array.
Can anyone help me with this problem? Does anyone know of an easier way to do it than trying to import from a text file?
Thanks for your help.
05-16-2011 04:41 PM
Take a look at the VIs for working with configuration files (File I/O->Config File VIs). These will enable you to read/write from an ini style cofiguration file. OpenG also has a convient VI for reading/writing ini files.
05-16-2011 04:58 PM
Here are a few examples of reading from a config file. Writing is simply the reverse action.
NOTE: All clusters used are typedefed clusters. For posting here I disconnected them from the typedefs).
05-16-2011 05:06 PM
Thanks for the example files, I really appreciate your help.