LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI with multiple front panels

Hello everybody,

I want to build a vi that will have a lot of data being displayed at the same time so it is almost impossible to fit everything into a single front panel. This vi will have a main function in the "MainMenu.vi" and three different other functions (A, B, C) that I want to run simultaneously with the main function. However only the Main and one of the other three will run at the same time. Also I want to be able to see both the front panel of the main function and the front panel of the other function currently running and be able to switch between them.

I considered making functions A, B, C three subvis but the connector panes will have to be too many and I had trouble displaying and switching between the front panel of the subvi and the MainMenu.vi.

Does anyone know a way to do this? And if the solution is to make 4 vis (MainMenu, A, B, C) how do you call one from the other and what is the proper way to exchange data between them? One function of the MainMenu will have to be the saving of data that the Main and the second vi are recording.

Thanks in advance,
Evdoxia.
0 Kudos
Message 1 of 9
(6,545 Views)
Hi

You could use a tab-control. This allows you to switch between different "views".

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 9
(6,537 Views)
There are a couple of other options you can use, as well.
  1. Create subVIs for A, B, and C and host them in a subpanel in the main VI.

  2. Create subVIs for A, B, and C and launch them as modal or nonmodal dialogs
As you mentioned, this brings up the problem of interprocess communication. How do you pass all that data around? The method I usually use for application development is functional globals (also called LabVIEW 2 globals and shift-register globals). If you are unfamiliar with this method, see the attached ZIP file for a complete description, with code. Think of your main VI and the A, B, and C VIs as the visible portions of three objects (object oriented paradigm). The “globals” are your data. You will also create functions or methods for each set of data. If you implement your “globals” as in the code below, each instance of the data will have an index. Your main data set should keep track of what the indices to all the other data sets are. Then, the only thing you need to pass to your subVIs A, B, and C is the index to the main data set. NOTE: Do not use normal LabVIEW globals for this job. You will create the opportunity for all sorts of race conditions you don't want to worry about. Normal LabVIEW globals are for use in extraordinary circumstances, and this is not one of them.

Good luck. Let us know if you have any more problems.
Message 3 of 9
(6,511 Views)
Thank you guys both,

I went with the tab controls and it works for me for now since I am not a huge expert on Labview 🙂

However I will definetely try to read and understand the other options and maybe use them in the future...

Thnaks again,

this forum is awesome
0 Kudos
Message 4 of 9
(6,478 Views)
Hi there,

this seems like an excellent resource to read about proper labview techniques (especially LV2 style globals), but unfortunately I cannot open the vis as I am using 7.0  :Smiley Sad

please can someone do me a huge favour and re-save this into 7.0 format.

thanks a million in advance

neil

0 Kudos
Message 5 of 9
(6,373 Views)
0 Kudos
Message 6 of 9
(6,355 Views)
thanks, thats great..

now i just need to try and understand it!!!! Smiley Very Happy

0 Kudos
Message 7 of 9
(6,351 Views)

Hi,

Since my english is out of practice i'll try the explain clearly my doubts and what i want to do.

I'm trying to manage 8 independent monitors with labview.

I have a PC with 8 VGA outputs and i'm trying to control de 8 screens with a main VI.

The main VI will read some information from a SQL DB and display it in the screens, but the information displayed in every screen is different. I mean, the 8 screens will not show the same information, is this possible?? any hint on this?

In the VI properties under "window run time position" you can select in wish monitor you want to display the VI.

So i was wondering if i can make the main VI and 8 subVIs and display it in monitor 1, 2, 3, etc. and with a tab control display (on the main VI) see each subVI.

Thanks, any help will be appreciatted.

Regards

0 Kudos
Message 8 of 9
(5,857 Views)
What you want to do is relatively straightforward, provided you are familiar with LabVIEW reference object usage (single-element queue data objects and/or action engines), subpanels, VI templates, and interprocess messaging.  While straightforward, it is not trivial.  One possible architecture is the following.
  1. Main control VI contains several tabs for the display of the panels shown in each monitor.
  2. The display shown in each monitor is a VI template so that two instances of it can be launched at startup - one in the monitor and one in a subpanel in the main control VI.  The display contains no state information.
  3. The state information for each display is contained in a separate single-element queue/action engine/local-shift-register-in-the-main-control-VI.  Said state information is encapsulated so that access to it is always atomic and automatically serialized, allowing both displays to be live (this is actually automatic with single-element-queues and action engines).  There is only one state for all views of a particular type.  It is initialized at startup before launching the displays associated with it.
  4. Communication between state and display is via queues/notifiers/user events.
The underlying architecture is multiple producer/consumer loops with GUI handled by event driven state machines.

Yes, you can do this in LabVIEW!  Let us know if you need more assistance.

P.S.  You would get higher visibility if you started a new thread, since this is a very old one and the topics are only peripherally related.
0 Kudos
Message 9 of 9
(5,831 Views)