LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you insert a strictly typed vi ref. into a subpanel?

I'm trying to run a re-entrant, strictly typed vi ,called by reference, in a subpanel.

 

This is so that I can change the source etc. for each instance of 4 instances in my final app

.

The top level VI runs but the called vi does not show in the subpanel.

 

Note: the reference is cast to the relevant type for the "Insert VI" method for the subpanel which may be the problem.

 

I attach the relevant VIs

 

 

Download All
0 Kudos
Message 1 of 5
(3,694 Views)

The Call by Reference Node (where you pass the DevX/CtrX into the Sub VI) causes the main VI to stop there and wait until the called Sub VI is finished.

Because you have a stop control in the SubVI to stop the loop it waits forever.

 

You should think about a different architecture.

 

 

Christian

0 Kudos
Message 2 of 5
(3,690 Views)

Yes, I'm not sure why you have a 'call by reference node' and a subpanel.  Your main vi controls are setting the values for the subvi, not the subpanel.

 

Usually, you would call by reference OR open the instance using the "Run VI" method and use the insert subpanel.

 

open app.PNG

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 5
(3,686 Views)

When you say that the main VI stops here, do you mean that it can't display the called VI and hence I can't cllick the stop button?

I thought that it would work similar to the way that the generic run VI-insert VI  works, except that I had the opportunity to enter some values via the connector pane before it opened.

 

If that's the case I definitely need another architecture - any suggestions?

0 Kudos
Message 4 of 5
(3,663 Views)

If you look at VT92's post, you see the Run VI Method which has a property called "Wait until done" which is set to FALSE.

With the call by reference node the Wait until Done is set to TRUE, which means the node waits until the VI has finished its execution. But in your case you have to stop the vi via the Stop button to finish the execution.

 

 

Christian

0 Kudos
Message 5 of 5
(3,657 Views)