From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple VIs in a subpanel

Hello All,

 

I found one example for subpanel in the labview you can find it in (Help -> Find Example -> Search -> Enter keyword (s) and then write subpanel you will find Multiple VIs in subpanel)

 

This example work fine with different subvi and my idea is that I have three signals (sine, square and triangle waves) and each signal comes from com port as two bytes ( I have five bytes from 0 -to- 5) = (byte 0&1 for sine wave, byte 2&3 for square wave, byte 4&5 for triangle wave)

the signal will be recievied as one at a time not all togather. So, if I received sine wave that mean byte 0&1, and if I received square wave that mean byte 2&3... so my idea here I want a sign these particular byte to subpanel. So, if the labview received byte 4&5, the subpanel will display the triangle wave..and so on.

 

please see attached figure and see example that I explaind first.

 

Kind Regards

ennngsubpanel.pngsubpanel1.png

0 Kudos
Message 1 of 8
(4,451 Views)

Since you are reacting to the serial port, the event structure makes no sense.  So you can probably just get rid of it.


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 8
(4,431 Views)

 

Thank you crossrulz for your quick replay.

 

Yes, I agree that the flow design does not make any sense as I would like to show the idea.

 

In that working example, we need to choose (sine graph or current time..) but my idea I need to display in subpanel as received byte.

 

Please give me an example I appreciate your help.

 

Kind Regards

ennng

0 Kudos
Message 3 of 8
(4,428 Views)

Instead of using subvi/subpanel, try to use tab for your display; based on message received hide\visible the tab using properties.

AB
Kudos are Accepted
0 Kudos
Message 4 of 8
(4,394 Views)
No, no, no. Do NOT use tabs. Tab controls have a long history of bugs that mess up graphs, but more to the point, tabs complicate your code by reducing modularity.

Subpanels are the exactly right way to go.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 8
(4,379 Views)

Thank you very much Mike for your suggustion.

 

I am not sure whether or not subpanels can be done automatic based on the data received !

 

because my idea is that base on the byte that the VI received the corresponding window should appear in subpanel.

 

so, byte 0&1 for sine wave display, byte 2&3 for square wave display and byte 4&5 for triangle wave display. All, these coming from com port and should be one of them at  a time. 

 

Please if you example for that or a simple VI to start with I really appreciate that and thank you again.

 

Kind Regards

ennn

0 Kudos
Message 6 of 8
(4,374 Views)
On my blog (link in my signature) I have written quite a bit about using subpanels. This is a good place to start:

http://www.notatamelion.com/2015/02/02/modularization-its-not-just-for-block-diagrams-any-more/

In terms of the switching, this is done by simply writing a new VI reference to a property node for the subpanel. Consequently, this operation can be triggered in many ways, button presses, menu selections, DAQ input change events -- you name it.

The other thing to think about is whether you want the VIs that are going into the subpanel to be running all the time, or only when it it selected. I find the first case easier to use, but it is up to you.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 8
(4,362 Views)

Thank you for your sugguestions.

 

Please guys any help! I tried many but non of which work! 

 

Please see attached figure!

 

I think this is very easy for people here who got talent please guy help.

 

What I want is that I want to display a waveform in subpanel related on byte that received! (byte 0&1 for sine wave, byte 2&3 for square wave and byte 4&5 for triangle wave) and one signel will come at a time.

 

Kind Regards

enng

 

 

 

 

0 Kudos
Message 8 of 8
(4,316 Views)