10-27-2009 08:29 AM
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
10-27-2009 08:42 AM
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
10-27-2009 08:53 AM
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.
10-27-2009 09:47 AM
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?
10-27-2009 10:24 AM
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