08-03-2005 10:19 AM
08-04-2005 01:51 PM
If you have LabVIEW Full Development System or higher you can do this using an event structure.
Place your popup (subVI, dialog box, etc.) in an event structure inside a while loop not attached in any way to the rest of your code. Then create a user event that you can fire from elsewhere in your program that launches the dialog. Since the while loop containing the event structure is not connected to anything else in the program, it will run in parallel, allowing the program to continue processing.
Refer to the User Events section of Chapter 9 of the LabVIEW User Manual for more information on configuring a proper user event for the event structure.
If you only have the Base package, then you can do this by having a while loop not connected to the rest of the program which polls a local or global boolean variable and launches the popup when it reads a true value.
04-06-2006 04:36 PM
04-11-2006 11:24 AM
Do you want this popup dialog to graph data while you still continuously acquire data? If so, you will need a way to globally share data between the top-level VI that acquires the data and the popup subVI that graphs it, while allowing the user to turn on or off the dialog through a switch.
The easiest, most robust way to do it that I can think of (and there are any number of ways of accomplishing this) would be to use Queues to send buffered data to the subVI. Queues are basicly a software buffer that can store any LabVIEW data type and allow them to be passed between subVIs on the same computer. Search the Example Finder and ni.com for some getting started tips on Queues.
I'll also attach an example below that demonstrates a very basic Acquire & Display technique using Queues and one Global Variable to trigger a stop command. The idea is that your top-level VI will acquire data in one loop and put that data in a Queue. The modeless subVI will be waiting on data from that Queue, and when it arrives it will graph it. Note that this is also an excellent technique for writing buffered data to file, analyzing it, etc.
Some things to keep in mind about this: your subVI should not be set to have Floating or Modal behavior if you still want to be able to interact with buttons on the front panel of the top-level VI. The example was written in LabVIEW 7.0.
04-11-2006 11:39 AM