LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extracting data from array inside a subpanel

Greetings,

 

I have a project in which a main VI sets up several subpanels with reentrant VI's (templates using the open VI reference) that generate independent arrays of timing data.  All of the subpanels are stopped when the Main VI is stopped.  The program works great, but what I really need to do is report the array data inside the subpanels back into the Main VI.

 

Is there some way to do this directly in the Main VI without resorting to writing the data to network variables (etc) inside the VI's running in the subpanel windows?  I've used Call By Reference to write values to controls before the VI is run in the subpanel, but have never needed to extract data from a subpanel.

 

Thanks in advance.

 

TR

><><><><><><
Tommy R.
><><><><><><
0 Kudos
Message 1 of 3
(2,228 Views)

Named queues would work well.  Wire the same string to the "name" terminal of an obtain queue node on your vit and your main VI, and they will all be able to pass data on that queue.

 

from the help for obtain queue:

 

Use named queues to pass data between two sections of a block diagram or between two VIs in the same application instance. If you do not wire name, the function creates a new, unnamed queue reference. If you wire name, the function searches for an existing queue with the same name and returns a new reference to the existing queue. If a queue with the same name does not already exist and create if not found? is TRUE, the function creates a new, named queue reference.

 

 

-Barrett
CLD
0 Kudos
Message 2 of 3
(2,223 Views)

OK, so I've been trying to call subpanel by reference, where the VI called is a template.  I'm supposed to be able to pass data to this VI by calling it this way, but it doesn't work.  Also, if there is a loop in the template VI, the front panel never opens.

 

Any ideas?  I based this off examples I found somewhere in the forum . . .

 

TR

><><><><><><
Tommy R.
><><><><><><
0 Kudos
Message 3 of 3
(2,188 Views)