FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

Best practise for making ini files on cFp 2100

Hello Everyone
 
In our application I need to make an ini file that default values are extracted from and also written too when new default values are inputted.
 
So if I have 10 numerical controls on the labview page each with a associted lables indicating what they mean and wire them to a build array.
 
Then also write out 10 string constants which are in the same order in the array as the numbers, and build an array.
 
then bundle these two arrays together and pass it into a vi that indexes the cluster so it writes the ini fuile until it finds an empty string. 
 
is tha tthe best way of doing it?  or should i use a property node of the numerical control to point to the lable.text.  and wire these in?
 
any advice would be much appriciated.
 
Thanks
 
Chris 
0 Kudos
Message 1 of 2
(3,503 Views)

Hello Monk,

What you are describing sounds basically okay.  I will need to do something similar in the near future, so I am interested in how your concept works out.

You shouldn't have to worry about finding the empty string at the end.  Setting autoindexing of the arrays into a for loop should take care of it.

Whether you need a cluster or not, I'm not sure.  Depending on what you do first, you would have either an array of clusters, or a cluster of arrays.  I think an array of clusters makes sense.  Each element is a cluster which represents a control.  The cluster would have a string value for description and a numeric (??, What if controls are combinations of numbers and strings, then would we use variant?) for the default value.

I think the file I/O configuration file VI's may be useful.  It may make a larger .ini file, but would handle a lot of overhead if you only want to write or extract one particular setting at a time.

Message Edited by Ravens Fan on 01-05-2007 05:31 PM

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