LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub Panel to display multiple graphs?

Hi All,
Was looking for some Input as to the following problem.
I have an Application that runs from a Top Level User |Interface.  I have a Log output on this vi which i have used Action Engine to update along with progress bars etc.  However my application runs say 10 tests in which there is data collected.  I would like to be able to update the data to the front panel however the data may will be different from test to test.  in one test i may want to display a 2D waveform the next a 3D surface graph etc.  I want to be able to have this as a small section of my Top level vi.  So i was thinking of mayby an Action Engine and a Sub vi Panel.  Then mayby disabling and enabling graphs overlayed on each other depending on which test i am performing?  Never attempted this type of thing before so wanted some advice on which direction to head down rather than code up somthing that is just completely wrong!
 
Any Ideas most welcome
 
Regards
Craig
LV 8.2  win2K
LabVIEW 2012
0 Kudos
Message 1 of 5
(2,737 Views)
Hi Craigc,
 
generally i would avoid overlays in the frontpanel. a better idea i such an application is to use a tab object. use for each test type or graph type an other tab (eg. 3D, 2D, Bar...). Then you need not to show/hide overlaying objects, you can easy change tabs by property node.
 
have a look at the example
regards, sparti
Message 2 of 5
(2,720 Views)
You can put the progress bar functionality in the action engine. When you
initialize it, pass a reference to e.g. an array of ten sliders. Adjust the
ae so it holds ten variables (or better, and array of values). When you
write a value to the ae, have it update the value in the array, and update
the array control with a value property. This solution is lighter then the
sub panel approach. Using a subpanel doesn't really solve this problem.

I would however prefer to put the graphs in a subpanel, over making the
proper graph visable (enabling or disabling doesn't help). Usually, graphs
have a lot of "house holding", and you don't want the house holding of ten
graphs in your main diagram. The VI's that display in the subpanels can be
some sort of ae as well. They can be ae VI's with two states (pass an
typedef enum to it): init and refresh. Call the VI with init option once,
and use the refresh option when there is new data. It doesn't have to be
difficult (although I usually make it more flexible). The main can decide
which VI is visible, by putting the front panel in the subpanel. If you have
similar graphs, you can make one VI template, and start a number of them
dynamically. You can pass slight differences when you do the init. This way,
you have only one VI to maintain.

Regards,

Wiebe.



Message 3 of 5
(2,713 Views)

Hi Wiebe,

This is more like what i was after.  I Already have Tabs on my front panel but wanted a small area on the front panel which displays graphs for the current test in progress on all of the tabs.  This is where i thought of a subpanel, to display a sub vi written as an AE which handles the graph.  Depending on which test is running, the Main vi displays the relevent AE in the sub panel.  Does this make sense?  My original approach was to use one AE and therefore one call from the main vi for the sub panel (Hence overlaying the graphs on the front panel of the AE and enabling / disabling them).  However Wiebe i think as you say, a simple AE sub vi for each test may be the way forward, then to load the relevent sub vi into the sub panel on each test.

Looks like this is probably the way to go unless anyone else knows otherwise.

Thankls all for the suggestions.

Regards

Craig

Message Edited by craigc on 10-05-2007 08:52 AM

LabVIEW 2012
0 Kudos
Message 4 of 5
(2,711 Views)
That makes sense.

A cool advantage is you can also display the graphs (that are inside the
subpanel) as floating windows, without changing the code!

Regards,

Wiebe.


0 Kudos
Message 5 of 5
(2,699 Views)