LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I combine numerous global variable VIs into a single one?

I am editing some existing Labview code, and creating new global variables. Each time I get another global VI. How do I combine them into a single global VI?

 

Steve

0 Kudos
Message 1 of 5
(2,873 Views)

If you have that many global variables you should probably look at whether you can rewrite your code in a way that minimizes them.

 

That said, a global variable VI is just a VI with controls on the front panel and no block diagram.  You can add as many controls as you want to that front panel and each one will become a global variable.  You can either open the global VI directly, or double-click on any global variable terminal to open the associated VI.

Message 2 of 5
(2,867 Views)

Thank you for the response. I had tried this and have tried again. I have set up a very simple VI with a global variable. I add a control into the global front panel, but can get no further. Nothing apperas in the main block diagram, nothinbg I click on helps, the manuals don't talk about it. I am clearly missing somthing, any clues would be gratefully received.

 

Steve

0 Kudos
Message 3 of 5
(2,847 Views)
To insert your global variable into your block diagram, add it to your block diagram in the same way you would add any other subVI.  You can right-click in the block diagram and choose "Select a VI" to choose your global VI, which will place a global terminal.  You can also open the global VI and drag the icon from the upper-right corner of the front panel into your block diagram.  Left click on the global's terminal to select the appropriate variable.
Message 4 of 5
(2,837 Views)

Many thanks, that's now sorted.

 

Steve

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