LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

configs and action sequences

Hello everybody.

I need to have a lot of config settings stored on disk. Well, I can do it
via text *.ini files and then read them during start of a application. But
as well I can use Global variable and change its values manualy (can I save
its defaults from VI?). So what is the best method? I mean best LabVIEW way.

Adn similar, I think, question. I have to implement several sequences of
controlling actions, that may be changed realatively frequently so.. Do I
need to rewire them everytime using LabVIEW, or it is the best to develop
some kind of a macrolanguage for the purpose? I don't like this idea,
actually.

I am using version 4.0.1.

Thank you in advance.

---Dmitry.
0 Kudos
Message 1 of 4
(3,014 Views)
You could, as you experiment with your application, figure out what are the best values for your globals, set these values as default and the development enviroment (even an exe) will remember these values when you start it. The problem with this is if you ever want to change the values, you have to go in, change the value and re-save it as default. And in the case of an exe, you would then have to recompile and re-distribute it to all the computers using it. It is much easier to add the values to a simple ini file and distribute it with the application. It is very easy to change the values with any text editor and once the code is written (to read from an ini file) it is easy to duplicate wherever you need it.

i'm not sure what you are talking about in your second que
stion. Do you mean that the code that executes after a button push or twist of a knob on the front panel will need to change at runtime? Sometimes a button push will execute code A and sometimes it will execute code B? Could you give examples?

Jared
0 Kudos
Message 2 of 4
(3,014 Views)
> i'm not sure what you are talking about in your second question. Do
> you mean that the code that executes after a button push or twist of a
> knob on the front panel will need to change at runtime? Sometimes a
> button push will execute code A and sometimes it will execute code B?
> Could you give examples?

Well, we have a sampling system that consists of several valves, so I
need to program sampling procedure for it. It is the sequence of turns of
valves and pauses for turning times and times for filling/empting of
tubings. Actually control program for the system does not need to be chenged
often but sampling procedure depends on mixture that used in the experiment.
So this part cannot be programmed "rock hard". It is planned to be changed
rela
tively frequently.

Thanks for the suggestion.

---Dmitry.
0 Kudos
Message 4 of 4
(3,014 Views)
The method that I have found best is to build a Global Variable VI, change the values within the program then use the "Invoke Node" methods to "Make Current Values Default" and then "Save Instrument".

For your second question:
Try programming with "Open VI Reference" to a name that was stored in your global variables. This way you can program all of your sequences as seperate VIs and then call them based on their name. Just change the name in the global variable when you need to change your control sequence.
0 Kudos
Message 3 of 4
(3,014 Views)