LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add indicator from sub vi to main vi

Hello I am new to labview. My subvi has a progress bar (Indicator) and i want it to be also displayed in my Main VI. Is there any process to do this. 

 

I am very new to lab view so step by step procedures are appreciated.

Thank you in advance.

0 Kudos
Message 1 of 12
(2,470 Views)

Promice,

I have put together an example for you.  Control references work well in this situation, but there are many ways of communicating between running VI's, dont misuse control references by passing large ammounts of data.  This is what Queues, Notifiers, User Events andDVR's (to name a few) are for.  I think a progress bar is a great use case of control references.

Michael.

Download All
0 Kudos
Message 2 of 12
(2,433 Views)

Hi Promice,

 

the easiest way to pass data in and out of a (sub)-VI is using the connector pane.

 

When you create a (sub)-VI, you can choose a pattern and select which control or indicator (frontpanel elements) belongs to which terminal.

 

The way Michael has supposed is more advanced an a very common way to change values of frontpanel elements of a main VI.

 

There is no wrong way, it depends on the application. So thanks to Michael.

 

For the first steps, I would suggest using the connector panel.


I've attached a modified example.

 

Kind Regards,

 

Philipp K.

 

Applications Engineer | NI Germany

 

 

Download All
0 Kudos
Message 3 of 12
(2,392 Views)
Phillip
I assumed wrightly or wrongly in this case he needs an asynchronous update which rules out the connector pane. Asumption based on the fact it is a progress bar. Also, if the OP liked this method and knew of nothing else it could lead to future coding nightmares hence the warning. Hope we both helped him.
Michael
0 Kudos
Message 4 of 12
(2,372 Views)
The simplest way would probably just make the front panel of the subVI visible.
0 Kudos
Message 5 of 12
(2,363 Views)
True, but status bar progress bars can look very cool. Im thinking of Word saving files or the teststand progress bar. The labview api for win7 progress on app icon in taskbar is nice too, I have used this for long file transfers before.
0 Kudos
Message 6 of 12
(2,358 Views)
The subVI does have the progress bar and those examples you mention are typically a pop up window - exactly what the subVI should be.
0 Kudos
Message 7 of 12
(2,352 Views)
Well yes. Ok, but I posted the example! And it would be damned annoying if TS sequence progress or Word autosave poped up in a dialogue 😉 it is truly application dependant and we need to know the application. Im willong to bet the OP will be best off showing the subvi in this case though.
0 Kudos
Message 8 of 12
(2,347 Views)
Well yes. Ok, but I posted the example! And it would be damned annoying if TS sequence progress or Word autosave poped up in a dialogue 😉 it is truly application dependant and we need to know the application. Im willing to bet the OP will be best off showing the subvi in this case though.
0 Kudos
Message 9 of 12
(2,346 Views)
Yes it is application specific. If the poster is calling the subVI in the normal manner, the main is blocked until the subVI finishes anyway.
0 Kudos
Message 10 of 12
(2,338 Views)