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: 

Move / transfer / migrate / separate global variables from one GV vi to another

I have a global variable VI that contains multiple global variables, which are used in different "regular VIs" (as global references). I'd like to separate them into two global variable VI files. (I understand that this won't affect the operation, but I'd like to make the program neater).

 

If I drag an global variable from a global variable VI into another one, or cut and paste, or duplicate, the association to the global references will all be gone, and I'll have to associate one by one manually.

 

Is there any way to move/transfer/migrate global variables from one VI to another?

 

Thanks in advance for your advice!

0 Kudos
Message 1 of 6
(1,146 Views)

I don't think you can, but would placing a tab control onto the global and sorting your controls into tabs be an acceptable alternative?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(1,120 Views)

Thanks for the reply and suggestion. This is not quite what I was looking for, but it's good to confirm that this function is not available, so that I don't have to keep searching and trying. Maybe this is something that NI can consider to add in the future.

0 Kudos
Message 3 of 6
(1,079 Views)

I will probably use some .txt or .csv files instead of variables, is easier to share files between VIs than variables references. I had a project where I use one computer to generate data (or write files) and another computer that displays the data (or read files) over the same network; It was my first project sharing data between computers before starting using Databases.

0 Kudos
Message 4 of 6
(1,038 Views)

Yes, file sharing is one way to communicate between two VIs. But it's slower and thus not suitable for time sensitive applications. Also, you need to watch out for the race condition.

There are other ways for data communication among multiple VIs, or between LabVIEW and other software, or between different computers, such as memory sharing, ZeroMQ, SystemLink, etc.. Each has its pros and cons.

0 Kudos
Message 5 of 6
(1,028 Views)

If your VIs are time sensitive then you should avoid using global variables (here) they're also propense to have race conditioning, and for the file sharing I was just suggesting a different option, but as you said; Each data communication has its pros and cons.

0 Kudos
Message 6 of 6
(1,024 Views)