05-14-2014 03:26 AM - edited 05-14-2014 03:28 AM
Dear all,
I am doing some 3D real-time measurements along with object detection/tracking. Currently, all my program modules (initialize, acquire, display, analize,...) are a part of the same .vi.
It would suit my needs better if these were in fact seperate modules that can be accessed via a main GUI application (the common denominator for all modules should be a path to a file or folder, etc...). For example:
So, when I run the "Untitled 1", I can select the individual modules. When I select the "Initialization" for example, I would want that the "Untitled 1" still runs in the background (with some intuitive loop delay to not load the CPU) and that a new .vi opens (and runs automatically). So, when I close the newly opened .vi, I can return to the main GUI ("Untitled 1) and continue working...
What would be the best / easiest way to do this?
Thank you and best regards,
K
05-14-2014 05:06 PM
Use a queued event-driven producer consumer loop with each of your subVIs set up to pop up in your consumer cases. The event-driven producer loop queues up elements, which are dequed in the consumer loop. This is a standard design pattern and a template for one take on this is found in the built in help.
05-14-2014 11:31 PM
05-15-2014 12:56 AM
Hello,
thank you for the prompt answers.
In this case, I think the producer - consumer loop will make things more complicated...
This seems like a really simple solution. Do you use such technique to handle simple dialogs as well as more complex?
I will try this, since it looks promising in my case.
I will post back about the situation when I get things working.
Best regards,
K
05-15-2014 02:24 AM