08-21-2009 04:26 PM
I've been staring at my computer screen for too long, so some of this may sound really stupid. I would like to get a chart to display on the front panel of my main vi. This chart is actually part of a sub vi, one step lower in the hierarchy than my main vi. This chart is also inside a while loop. So, this while loop is creating issues in outputting the data for the chart on my main vi. There has got to be a way to tunnel under the while loop or something. When I try to wire things outside the loop, the vi will run, but no actual data is being received.
I have completed a few tutorials on subvi's, and the only distinction I can make between the tutorials and my code, is that I have a while loop.
08-21-2009 04:29 PM
Attach a sample main and subVI so we can see exactly how you are trying to go about this. Where is the while loop? Is it in the subVI? Is it running continuously? How or when do you stop it? Is the front panel of the subVI opened when called?
You can pass data out of while loops using local variables and queues. You could also pass a reference to a control or indicator into the while loop and have the program update it using a property node that is wired to that reference wire.
08-21-2009 04:29 PM
You can look ath the solution in this thread.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=433344
08-21-2009 06:46 PM
You could use a producer consumer architecture
it is in labviews templates.
08-22-2009 08:48 AM
08-24-2009 12:09 PM
So,
I've pasted my code into the producer/consumer templates and have gotten my main code to run. But I do not know how to utilize the queueing(?) aspect of the template to achieve what I really desire. I still want to get the chart data out of the while loop, so that I can make a subvi, and use it later. This coding is essentially the acquire/display aspects of the experiment, so I only need the chart to be displayed at highest level front panel. I can see that the queue/enqueue items are anticipating a certain element, that the coder determines. I know that I want my elements to compatible with a 2D array of singles. But Ireally don't how to proceed. My code is attached.
08-24-2009 12:31 PM