LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using queue with subpanel VI

I am trying to use a queue to carry data between my main VI and a running VI in a subpanel.  My motivation is to clean up my main block diagram by sequestering a group of controls and indicators in a VI in a subpanel.

 

The attached VIs tell the story.  Subpanel Queue.vi is the main.  It generates a sine wave one point at a time, feeding each to the queue as it goes.  A control lets you choose whether to run the subVI normally (pop-up) or in the subpanel.  When run normally, the subVI sees the data and charts it in real time, as intended.  When run in the subpanel, the queue in the subVI never gets anything.  I am pretty sure I am using the technology to feed a parameter to a subpanel subVI as demonstrated in the example "Subpanel Templates.vi" in the LabVIEW examples.

 

Can anyone see what I might be doing wrong?  Or is this known to not work, and if so, what do I do instead?  For that matter, is there any way to get debugger access to a VI that is running in a subpanel?  I'd really like to watch what's going on in there, but I haven't found a way to do it.

 

Ken

0 Kudos
Message 1 of 2
(3,126 Views)

In the subVI that you place into the subpanel you should be using Obtain Queue to get the queue, rather than trying to set the value via a control reference. I would give the queue a name so that you can distinguish it from other queues that you may end up using. The control reference that you're getting from "LoadAndRunByName" is a generic reference, not a reference to a queue. Thus, setting the value the way you're doing it using the control reference isn't going to work.

 

Aside: You should not be creating infinite loops. As it is, stopping the VI requires using the Abort button in the toolbar. This is BAD.

0 Kudos
Message 2 of 2
(3,104 Views)