LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating several subpanels in a loop from a table of references

 

Hi all,

 

I have a question concerning subpanels: how is it possible to use the "Insert VI" invoke node in a loop ? When I do this, using a table of references to my subpanels as an input, only the last panel stays on display.

 

Thanks in advance !

T

____________________
JB
0 Kudos
Message 1 of 11
(2,860 Views)

I'm not sure I understand.  Can you share some code so that we have a good reference.


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
0 Kudos
Message 2 of 11
(2,856 Views)

Here is a screenshot of my test.

 

Capture d’écran 2012-12-05 à 20.21.58.png

____________________
JB
0 Kudos
Message 3 of 11
(2,853 Views)

Yes, the last reference you pass into the Insert is the one that will be in the subpanel.  What did you expect to happen?


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
0 Kudos
Message 4 of 11
(2,850 Views)

@crossrulz wrote:

Yes, the last reference you pass into the Insert is the one that will be in the subpanel.  What did you expect to happen?


Just for clarification, they all will be loaded but only the last will actually get displayed. It is just that the loop will run fast enough that the user will not see the other subpanels being loaded. Not sure if the compiler would be smart enough to bypass even trying to load the other ones or not. Either way, only the last one will be active.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 11
(2,837 Views)

 

Thanks for your answers.

So there is no way to make something like this work ?

____________________
JB
0 Kudos
Message 6 of 11
(2,835 Views)

In order to display multiple items you would need to have multiple subpanels. A single subpanel can only display one thing.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 11
(2,833 Views)

Tycho,

 

Only one VI can be in a SubPanel at any time and you can't create new SubPanels on your front panel at runtime.  You can load VIs into SubPanels but the SubPanel must exist.

 

You could do something like this where you create a bunch of SubPanels, load your VIs into the SubPanels in a loop, and then hide the SubPanels you aren't using:

Screen Shot 2012-12-05 at 5.25.43 PM.png

 

Getting more advanced you could programatically move and resize those SubPanels to ensure they take up all the available space.

 

Hope this helps,

 

Simon

0 Kudos
Message 8 of 11
(2,808 Views)

Hi Simon,

 

Thanks for your answer.

How do you get this:

 

Capture d’écran 2012-12-06 à 11.12.55.png

 

?

 

Cheers,

T

____________________
JB
0 Kudos
Message 9 of 11
(2,795 Views)

@tycho75 wrote:

Hi Simon,

 

Thanks for your answer.

How do you get this:

 

Capture d’écran 2012-12-06 à 11.12.55.png

 

?

 

Cheers,

T


Create your subpanels. Place a VI server Reference constant on yoru block diagram. Right click on it and link it to your desired subpanel.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 10 of 11
(2,777 Views)