02-15-2017 04:28 AM
Hello, I have the following setup and a problem that I can't solve yet:
a Main VI with its user interface that dynamically calls subVIs.
One of those subVI calls another VI which has second User Interface that should keep running in parallel with the main User Interface while the caller VI is closed and the next dynamically called subVI runs.
How can I achieve that? Everytime I arrive at the point where my subVI that calls the second UI runs, the VI with the UI starts successfully but the caller VI is "stuck" and waits for my UI to be closed in order to go to the next dynamically called subVI.
If someone can help me it would be very very appreciated!
Solved! Go to Solution.
02-15-2017 04:36 AM
02-15-2017 04:48 AM
This is a snipped of the function that dynamically calls all the subVI. One of those subVI calls my second UI and remains stuck..
02-15-2017 04:54 AM
02-15-2017 04:57 AM
that while the other subVI perform some kind of measurement and then they are done, while this subVI is needed in order to launch the second UI with some specific parameters...
02-15-2017 05:54 AM
02-15-2017 06:26 AM
@cassaniti wrote:
Everytime I arrive at the point where my subVI that calls the second UI runs, the VI with the UI starts successfully but the caller VI is "stuck" and waits for my UI to be closed in order to go to the next dynamically called subVI.
The PNG image you posted shows a standard Call-by-Reference, which is just like a subVI call, in that it waits for the subVI to finish. But it sounds like you want to do an Asynchronous Call By Reference (ACBR), which is a different thing. Look in the example finder for some examples of ACBR; you want "Fire and Forget", not "Call and CXollect".
02-15-2017 06:57 AM
Block Diagram: Right-Click: Application Control -> Start Asynchronous Call
02-15-2017 07:23 AM
Thanks!! The Asynchronous Call is exactly what i needed. Specifically the "call and forget". I followed this example in order to do it:
http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/acbr_call_and_forget/
02-15-2017 07:28 AM
One more little question: how can I programmatically close this second UI that I asynchronously opened through another subVI? I don't have its reference number but only the VI name... is that possible or do I have to somehow access the task manager and kill it?