09-21-2008 09:33 AM
Good day to all
what I wanted to ask is:
lets say I'm running a VI who is calling another VI.
now I want to close the first one and leave the second one running.
can it be done? and if so how?
thanks
shai
09-21-2008 11:18 AM
Use the VI Server to launch another VI. E.g.:
In your case you would set a False for "Wait Until Done". This will spawn the VI on its own. Your parent VI can simply close itself once it finishes.
09-22-2008 08:28 AM
If you are creating an executable to do this, you need to make sure the second VI is up and active before closing the original VI. The easiest way to do this is to poll for the second VI's run state while in the first VI after launching the second VI (a 50ms to 200ms interval is plenty fast enough). When the second VI is running top-level, it is safe to close. You can also use other communication mechanisms such as queues.
Why do you care? The run-time engine continuously checks to see if there is a VI running top level. If not, it exits, taking all running VIs with it. If you exit the first VI before the second gets up, the run-time engine will close.
10-16-2008 05:03 AM
When calling a VI to run and giving him the parameters to run by how can i make it run on full screen (and not in the background)?
10-16-2008 08:07 AM - edited 10-16-2008 08:08 AM
You can use a Property Node and select the properties for FP.IsFrontMost and FP.SizeToScreen and wire a value of TRUE to both of them.
R
10-16-2008 08:53 AM
10-16-2008 09:14 AM - edited 10-16-2008 09:15 AM
That's a property node. What I had shown in my example is an invoke node. You will need to learn about property nodes and invoke nodes which can be used to act on specific LabVIEW classes, such as VI references and control references. You can learn about these in the LabVIEW Help and in the examples that ship with LabVIEW. For control references you can take a look at this: Control References: Overview. For a VI the same concepts apply, except you just have a different list of properties and methods.
To pass values to a VI that you call dynamically you therefore have to use the appropiate methods, like in this example:
To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.