11-02-2012 10:13 AM
Hi all,
I'm still pretty new to LabView, and I'm not sure how to properly do this..
Basically I have a working VI which validates a chassis, but I want to use the code on another chassis. The only differences (that I know of) are the login name and password for the new chassis. I enter these two fields using string constants in a subVI.
If I simply copy the directory of the VI and all the subVIs to a new directory, and open one of the new .VIs, any of my changes are updated to the original VI. How do I break the links to the 'old' files?
I want to have separate directories for chassis "A" and chassis "B" with all the necessary VIs and subVIs in each, even if the files are redundant on the hard drive (in case the VIs or subVIs need minute changes).
Sorry for the vagueness in the subject, by the way.
Solved! Go to Solution.
11-02-2012 10:24 AM
11-02-2012 10:42 AM
GerdW,
I just gave this a few tries - I keep getting a message box window saying 'LabVIEW: Generic file I/O error.' And only some of the files are in the new folder.
11-02-2012 11:10 AM
Are you using projects?
Copy the code to your new location. Create a project and add the folder that contains your code. Use the conflict resolver to fix your VIs.
In some weird situations, I have also been known to delete the old project, resolve the conflicts for the new project, and then restore the old project from the recycling bin.
11-02-2012 11:57 AM
I opened up my main VI, created a new project which included my current open VI, saved, then copied the directory. Renamed the project and all the paths look like they use the new directory.
I didn't run into any conflicts to resolve - should I have?
Thanks for the help guys.
11-02-2012 12:26 PM
You shouldn't necessarily have conflicts. But if you did, the project helps to clean them up.
11-02-2012 12:27 PM
No. You shouldn't have had problems. But you also shouldn't have had the problems you first said you were having.
Generally problems with cross-linked files are going to occur if you have subVI's that are in another location independent of your first project folder. When you create a new project folder, it may still have subVI's pointing to the original location. But if that was the case, you would possibly be still having problems.
The other issue might be if you try to open your second project (without using project a project file) while the first project is still open. You can only have one file open of a given name at a time unless you have them open in different project instances (which won't be the case if you are not using the project hierarchy.) Then the 2nd projects VI's will get cross-linked to the first because they were the ones in memory at the time you opened the 2nd project. This certainly could be the cause of your original problem. But you'll generally have a hint it is occurring because you'll have dialog boxes that tell you a file is already open and the one in memory is being used.