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: 

What happens when two computers call the same code stored in network storage?

Solved!
Go to solution

We have our code on network storage and have only been running code on one computer.  We have now duplicated our setup and would like to use the same code to run the new setup from a different computer.  We would like to run both setups simultaneously (both using same code from network storage).  Will there be conflicts here or do both computers load their own copy of the vi to run from?  I should say that we have no global variables.

 

I'm interested in the answer to this question anyway but I would also be happy to hear any suggestions (or even criticisms) on how to do what we are doing.

 

0 Kudos
Message 1 of 3
(2,133 Views)
Solution
Accepted by topic author jbm4t

You should seriously consider a source control system, which is the best solution here. That gives you one master copy of the code on the network. Each computer retrieves the latest revision from source control, making a copy on the local disk. Source control helps maintain a known good backup, and allows you to track changes and compare versions or revert to older code when something breaks.

 

I'm fairly certain you can open the same VIs stored on a network drive on multiple computers concurrently. Global variables are irrelevant here. Each computer will independently load the VIs into memory. The problem is if you edit and save the VI on one computer while it's open on another, and if you make edits on both simultaneously, you'll definitely lose some of the edits and could possibly corrupt your VI and lose all of them, which is why you should be using a source control system instead.


If you have the application builder, I recommend building your code into an application. You can store the application the network if you want, and run it on multiple computers.

Message 2 of 3
(2,110 Views)

Thanks for the great reply.

 

 

0 Kudos
Message 3 of 3
(2,084 Views)