LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data from subvi's several levles down to top level vi

Yes, but the data doesn't have to go "down the stairs".
Once your sub-sub-subVI is executing, it can send data directly to the indicators.

If that's a problem, put the references into a global variable, and access them in the sub-sub-subVI.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 11 of 15
(971 Views)
Yes the question wasn't how to use references it was how to avoid connector panes.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 12 of 15
(971 Views)
Not that that is too slow, it would work fine, I think he doesn't want to have to have a loop that continuously updates controls. He just wants it done instantly on the front panel of the main GUI as soon as the value is generated in the sub-vi. Create a reference to a control or indicator and wire it into a sub-vi through its connector pane (you have to have a reference control in the sub-vi connected to is connector pane), when you set the "value" property on a property node connected to that reference in the sub-vi it will update the value instantly on the top-level vi's FP. He really was looking for a way to do that without wiring through the connector pane, because if you had 10 indicators you want to update, he doesn't want ten
references all wired in through the connector panes of maybe three or four levels of sub-vi's to get to where the data is actually generated. With references you don't need a 'polling loop' type structure in a main GUI to update indicators every 100 msecs or whatever, the sub-vi's themselves actually update the values on the top-level vi indicators and it cleans everything up.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 13 of 15
(1,221 Views)
Perhaps you could use notifier(s) for this. As long as you call the same notifier in both the main vi and sub3 you don't have to pass the reference to the notifier down the ladder. A loop in the main vi can wait for the notifier and update the FP indicator(s). Granted this makes sub3 very specific to this program, but it is a rather simple way to pass data through the program chain without having to wire references.
0 Kudos
Message 14 of 15
(971 Views)
Hello
Tnx for all the suggestions and comments. Yes, I am trying to avoid connector panes and wiring between sub vi's, to avoid further clutter on the panes. One method I like is using the VI-server to talk directly between vi's without any wiring. But not being an LV expert, I keep getting a random LV error 1000, which I have not been able to debug yet.

So, the next best thing I am doing is implementing by using refnums to talk between vi's. Yes, this involves what I didn't prefer( wiring connector panes). But for now it works without giving me the random nagging error 1000. In addition, using the VI-server method was something one NI-TS engineer discouraged me with, citing several valid reasons.

The advantage with refnums
is that all info in Main vi gets updated whenever the related subvi does that, so really no polling or watching for any data change is required. One disadvantage is those property nodes in the diagram are so big relative to other vi's esp with their text that they take up lots of real estate in the block diagram. Is there a way to reduce only their font size or text labels to be more compact?

Regards
Khan
Xerox
0 Kudos
Message 15 of 15
(971 Views)