LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanel and Main VI Simultaneously

Solved!
Go to solution

I was wondering how feasible it would be to have a subpanel portray a sub-vi and allow the user to interact and observe changing values on the subvi, while simultaneously having the ability to control indicators and controls on the main vi, next to the sub-vi? For instance, having a subpanel with a sub-vi on the left and controls/indicators for the main vi on the right. The user should have the ability to control both in real time. Is that possible? If so, how should I go about doing it? I have not been able to come up with a good method. All help is appreciated. Thanks in advance!

0 Kudos
Message 1 of 7
(2,482 Views)

Search the examples for subpanel.  There are a couple of examples there on how to do this.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 7
(2,457 Views)

So I checked the tutorials, and they work great ONLY for using a subvi, finishing a task there, and then accessing the next vi in series. I would like to go back and forth between the two in parallel with very minimal pause in between. Is that possible?

0 Kudos
Message 3 of 7
(2,446 Views)

Are you asking about a sub panel in a sub panel in a sub panel ...etc...

 

Or if I understand your question correctly your are asking about a subpanel with a sub VI front panel displayed inside that subpanel. Can you interact with both the main top level VI controls and the subpanel's subVI controls at the same time. YES! That is how the subpanel is designed to work.

 

But the top level VI only reads or writes to the controls on the the top level VI and the subpanel VI only reads or writes to the controls on the subpanel sub VI. The top level VI does not normally read or write to the controls on the sub panel and the sub panel VI does not normally read or write to the controls of the top level VI. (you can it you pass referances)

 

That is the benefit and the number one reson the use sub panels making your user interface code easier to write and maintain.

Each VI, rather its a top level or a sub panel, is only responable for its own controls 

 

What have you tried os far? Post your code.

 

As for the other...

I have not tried it but I would think you could have a sub panel in a sub panel in a sub panel ...etc... and still interact with all the controls on all the sub panels at the same time.

 

 

Omar
0 Kudos
Message 4 of 7
(2,440 Views)

@jfherrm wrote:

So I checked the tutorials, and they work great ONLY for using a subvi, finishing a task there, and then accessing the next vi in series. I would like to go back and forth between the two in parallel with very minimal pause in between. Is that possible?


You can spawn multiple sub VI and get them all running in the back ground. Then select which one to display or load into the subpanel as needed. Like if you used a tab control. Removing a sub VI from the sub panel does not end or stop the subVI from running and you can go back to when needed. The subVI does not have to "finishing a task there" but can keep on running even it its front panel is removed from the subpanel and replaced with another subVI

Omar
0 Kudos
Message 5 of 7
(2,437 Views)
Solution
Accepted by topic author jfherrm

@jfherrm wrote:

I was wondering how feasible it would be to have a subpanel portray a sub-vi and allow the user to interact and observe changing values on the subvi, while simultaneously having the ability to control indicators and controls on the main vi, next to the sub-vi? For instance, having a subpanel with a sub-vi on the left and controls/indicators for the main vi on the right. The user should have the ability to control both in real time. Is that possible? If so, how should I go about doing it? I have not been able to come up with a good method. All help is appreciated. Thanks in advance!


Yes, having a sub-panel is the same as popping out a separate window, if you want both to be active you'll need to start the 2nd process as an asynchronos call, that's about it. They'll run separatly and control their own stuff.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(2,406 Views)

@jfherrm wrote:

I was wondering how feasible it would be to have a subpanel portray a sub-vi and allow the user to interact and observe changing values on the subvi, while simultaneously having the ability to control indicators and controls on the main vi, next to the sub-vi? For instance, having a subpanel with a sub-vi on the left and controls/indicators for the main vi on the right. The user should have the ability to control both in real time. Is that possible? If so, how should I go about doing it? I have not been able to come up with a good method. All help is appreciated. Thanks in advance!


What you are describing is what a subpanel does.  You just have to make sure you are running your "subVI" asynchronously.  Then your subVI isn't blocking any of your top level VI's loops from iterating.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 7
(2,393 Views)