01-27-2010 10:37 PM
I tried to copy a VI so that I could change it without messing up the original, but now I get this error.
The VI is the Holonomic Drive.vi int the WPI Robotics library.
How do I fix this? The error message give some instructions, but it is not apparent how to do what it asks. Neither the original Vi or the copy is now working.
When they talk about "the library" does that mean a library of VIs in the LabView installation, or one that is part of the project?
I see vi.lib listed in the dependancies area of the Project Explorer, and Holonomic Drive.vi is listed in it.
Forgive me if this is answered somewhere, but I haven't been able to find it.
01-28-2010 06:53 AM
Most of the FRC software components are part of LabVIEW libraries (.lvlib files). VIs know which library they belong in, and libraries know which VIs they own. You copied a VI that was part of a library, so now the VI thinks it's in the library but the library has no record of it. The error you're seeing is specifically mentioned in the LabVIEW help. You may be able to solve it by opening the VI and choosing File -> Disconnect from Library. However, if that VI calls other VIs that are part of the library, it may no longer run, since libraries can be used to limit access to the VIs they contain. You could also add your modified file to the library. In general, however, it's probably best not to modify any libraries that are provided by NI or FIRST, since they could be overwritten by an update.
01-28-2010 09:10 AM
I am having the same problem. The Error list tells me to add the VI to the library again or select File>> Disconnect from Library. Selecting File>> Disconnect does not repair the problem. I get Block Diagram Errors. Do I need to reload LabView or is there a fix?
Any help you can give me will be appreciated.
01-28-2010 09:15 AM
The VI that you copied no longer has access to some of the VIs it needs to call, because it's no longer part of the library and those VIs are not accessible outside of the library. This causes the block diagram errors. The fix is to add your modified VI to the library, but be warned that if you do that, you will probably run into errors if you move your code to another computer (where the library has not been updated, since it's part of the LabVIEW installation), and your changes could be wiped out when you install an update. Alternatively you could copy the entire library and all the VIs in it to a new location and then make your changes, but you may miss out on fixes if an update to that library is released.
01-28-2010 12:49 PM
Thanks. That all makes sense.
I wanted to just put the original back in the program and make it work again, but still got the error. I determined the VI came from the vi.lib\Robotics Library\WPI\RobotDrive folder and there was still a copy of the VI there. Simply moving the VI to the right place isn't enough, there must be some kind of registration process for the library and VI that I can't seem to find.
I repaired the problem by going to another computer with LV installed and copying the entire vi.lib folder and replacing the one on the broken installation. That was probably more than necessary, but it worked.
By the way, the "Save As" copy dialog in LabView is the worst - most confusing and dangerous - I have ever seen. It makes Microsoft look sane.
01-28-2010 01:54 PM
If the original VI was still there, then you actually didn't need to do anything to fix the problem other than remove your copy of the VI, and replace it (in your code, not in your filesystem) with the one from the library. To add a VI to a library, open the library (it has a .lvlib extension), then right-click on the library and choose Add... -> File.
Believe it or not, the Save As dialog box is an improvement from how it used to be. You can find a detailed explanation of the Save As... dialog box here.