10-17-2020 12:24 AM - edited 10-17-2020 12:24 AM
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!
10-17-2020 01:41 AM
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?
10-17-2020 06:24 PM
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.
10-22-2020 04:28 PM
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.
10-22-2020 05:47 PM
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.
10-22-2020 07:02 PM
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.