LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass data from an open VI to another VI

Hi all,

I'm new to LabView.

 

I'm trying to build a multi page GUI.

 

The first page contains a set of buttons that the user can press, like a sort of menu. Each of them opens a different GUI. In order to do that I'm using the Invoke Node command.

 

What I'm trying to understand if it's possible to pass data from one of the subGUIs to the others. How can I do that?

 

Thanks

0 Kudos
Message 1 of 7
(3,093 Views)

Possibly the easiest thing to do is to use a tab control and just add as many pages as you need for the various GUIs.

You then don't need to pass data around between subVIs because it's all within the same VI. Smiley Happy

 

 

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

I tryed that but it is not exactly what I was looking for..

0 Kudos
Message 3 of 7
(3,048 Views)

Hi soul,

 

use notifiers, queues, functional global variables, simple global variables...

 

- Did you look at the ActorFramework coming with LabVIEW2013 (or perhaps also with LV2012)?

- Did you look at the appnotes (and other online documentation) about recommended code structures (like state machines, producer-consumer, and other)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,043 Views)

If you need to communicate between subVIs within one main program, then you can use global variables etc. as mentioned above. If you have separate programs running, then you will have to use Shared Variables, Data Socket, or something along those lines.

0 Kudos
Message 5 of 7
(3,039 Views)

Hi Thenomadsould,

 

the best way to communicate beteween two different running VI is Functional Global Variable (FGV).

 

Here you can find a very simple example about how to create and how to use FGV. Here there's another example.

 

Best Regards.


Cla_CUP

NI Italy

0 Kudos
Message 6 of 7
(3,005 Views)

The FGV (or AE - Action Engine if having more actions that Get and Set) is the easiest way, but i'd say Events or Queues is the more correct one. As a note, it could be nice to insert the GUI as a sub-panel.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(2,997 Views)