How can I open a VI as an independent program out of an other program?
I have two vi's. In the first VI I want to make configurations and after that I want to start an second VI out of the first VI with an simple OK Button.
Re: How can I open a VI as an independent program out of an other program?
The easiest way to do that is to use the event structure (7.0). and edit the events of the structure to handle the OK button. If you do not have a version of labview that has the event structure capability, then you can use a statemachine. Look at the examples for further info. I'll try to attach an example VI later if you need one. Joe
Re: How can I open a VI as an independent program out of an other program?
tmh there is no need to do polling if he uses the event structure. Polling takes up processor the event structure, saves processor time for something else because it waits for that one event to happen. I agree event structure is probably overkill but it is easy to learn how to use and will let his application be more robust.
Re: How can I open a VI as an independent program out of an other program?
User VI server, under Application Control, to load and run the second VI. This way the original VI can exit after the second VI is running. For examples, goto Help - Find examples and search for VI server. -Joe
Re: How can I open a VI as an independent program out of an other program?
I don't see why it needs an event structure... the simplest way is to make one VI a subVI of the other (it is up to you which way round), use the Front Panel Visible properties of the two VI's to control which one is visible at which time, and use dataflow to ensure that the functions of the main VI only execute after the configuration VI has finished. Assuming the configuration VI displays a panel of settings for the user to adjust, you are going to have to use some kind of structure to ensure you read the latest values of these when the OK button is clicked, so you might as well make it a while loop that also polls the OK button.