LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using config files to setup front panel objects and DAQ info.

I am trying to write a program that condenses 5 versions into one. I need to be able to load a configuration file based on the users choice of which machine they are using and use that information for my dropdown boxes and for what was constants in a case structure based on a choice from the droplist.
For example, if a certain part was selected, it had 5 limits listed as constant that the data aquired was compared to. The limits were inside a case structure wired to the droplist.
0 Kudos
Message 1 of 7
(3,351 Views)
Could you be a little bit more descriptive about your problem? I am not sure what you are asking.

For instance, 5 versions or what? What exactly changes per machine?

Allan S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 7
(3,351 Views)
I have a case structure that is connected to a digital line. The program receives a value from the machine's PLC and it picks the appropriate case. Inside this case, there are constants for tolerances for the measurement that was selected. Each case has the same number of constants to control the tolerances for 5 different characteristics of the measurement. There are 32 cases each with different values. The problem is, I have 5 different versions of the program with up to 32 cases in each structure, (over 150 different sets of tolerances). I do not have them all in one program as the same case number is used somewhere else and may have different values. The display information on screen is also different from one machine to the other, and I want to be able to
hide or show certain front panel objects. I would like to set up an .ini file of some sort that stores all my case selections and load them in blocks, on one machine i load these 32, on a different machine, load the other, etc. Also be able to load the preferences for what is visible and what is not on the front panel.
0 Kudos
Message 3 of 7
(3,351 Views)
"I have a case structure that is connected to a digital line. The program receives a value from the machine's PLC and it picks the appropriate case. Inside this case, there are constants for tolerances for the measurement that was selected. Each case has the same number of constants to control the tolerances for 5 different characteristics of the measurement. There are 32 cases each with different values. The problem is, I have 5 different versions of the program with up to 32 cases in each structure, (over 150 different sets of tolerances). I do not have them all in one program as the same case number is used somewhere else and may have different values. The display information on screen is also different from one machine to the other, and I want to
be able to hide or show certain front panel objects. I would like to set up an .ini file of some sort that stores all my case selections and load them in blocks, on one machine i load these 32, on a different machine, load the other, etc. Also be able to load the preferences for what is visible and what is not on the front panel."
0 Kudos
Message 4 of 7
(3,351 Views)
You should look into dynamically loading the correct VI using VI server. Therefore you can selectively load whichever VI you need.

As for all the saving you can simply create a text file and read in the values and to control what is visible use a property node and manipulate the visible property value.

I know this is very general, let me know what you need more specifics on.

Allan S.
Applications Engineering
National Instruments
0 Kudos
Message 5 of 7
(3,351 Views)
How do i set up the text file and read from it.
0 Kudos
Message 6 of 7
(3,351 Views)
The example finder has tons of examples on how to read and write to a text file. For instance, if you type 'text' in the example finder there is an example of how to read and write to a text file. If you modify these examples they should be able todo exactly what you want.

Allan S.
Applications Engineering
National Instruments
0 Kudos
Message 7 of 7
(3,351 Views)