LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get indicators in a subVI to also appear in the main VI and continue to remain active/update?

My problem is the following: I have several indicators and controls in the front panel of a subVI and I want them to also appear on the front panel of the main VI and remain active. Simply wiring the subVI connector pane to controls/indicators on the front panel of the subVI and then dragging the connector pane into the mainVI's block diagram, then clicking on the terminals of the icon and creating either controls or indicators does not work. The controls appear to work but the indicators that appear on the front panel of the main VI do not update as they do for the subVI front panel. Why is this? Am I right in thinking that I need to use Control R
eferences? The indicators and some of the controls are in a while loop. Does this present a problem and why would it only affect the indicators? (The indicators show the current progress, the elapsed time and the number of times the mechanical shutter device has opened and closed). As a novice to LabVIEW I would be extremely grateful for any advice. Thanks, Adrian
0 Kudos
Message 1 of 9
(3,623 Views)
Here's a couple of recent threads about the same.
Good Luck, Doug

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000076090000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000B5210000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Message 2 of 9
(3,616 Views)
Doug, thanks for the info. I managed to crack it!
0 Kudos
Message 3 of 9
(3,616 Views)
Doug, thanks for the info. I managed to crack it using Control References!
0 Kudos
Message 4 of 9
(3,616 Views)
Yes references are the way to go. If you just connect to the connector pane of the sub-VI then the status on the main VI will not update until the sub-VI has finished.

Here is my library functions that I built for references. Use open reference (give it the name of the VI that you want to change the controls/indicators on), connect the reference line to the set/read VI that you want to change and then close the reference (this will release the memory used by the reference).

I hope this helps.
Message 5 of 9
(3,616 Views)
I have got a similar problem. My subVI contains controls and I want them in the Main VI Front Panel. I read your answer, but I can't manage to solve my problem. I don't know how control references work and how they can help me. What do you mean by connector pane? (This could look a stupid question, but English is not my mothertongue). Is it the sqaured icon with the connector pins?
I tried to open your Front Panel Reference Library, but WinZIP can't extract it (there is an error, it says). Can u help me, please?
0 Kudos
Message 6 of 9
(3,616 Views)
Interesting. I tried the download myself and I can not open it either. So... Here is the current version of the library. This one uses polymorphic VIs, so you do not need as many VIs to access everything.

Basically, a control reference can give direct access to a control in another VI. By opening a reference to your top level VI, you can use sub-VIs to change the controls and indicators on the top level VI. Changes are instant and do not wait until the sub-VI has finished running. You still have to create the controls or indicators on the top level VI panel, but you can change them from sub-VI's very helpful.

Rob
0 Kudos
Message 7 of 9
(3,616 Views)
Hello Robert.

I have the same problem but with LabVIEW PDA Module for Pocket PC. This module do not support the "Invoke Node" that is used in your library.

Do you know any other way to turn around this?

Thanks for your help.



Nelson Neves
0 Kudos
Message 8 of 9
(3,513 Views)

The PDA module does not support property nodes.

If you want to pass data between VIs you can use any types of globals (standard globals, functional globals, etc...). In any case, the PDA module can only show one VI at a time, so if you open the panel of a subVI, there is no point in updating the panel of the parent.


___________________
Try to take over the world!
0 Kudos
Message 9 of 9
(3,508 Views)